• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

case sensitive search in Oracle

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As we all know search in Oracle are case sensitive.
But how will somebody extract something like "java" when the actual value stored in db is "JaVa".
Is there any way to achieve this.
Any help would be appreciated..
Thanks
Shikhar
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
you could use UPPER on your joins, like this:

and for a more performatic query, create an index with de UPPER function.
Wagner Danda
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sikhar
C u have to do one thing..
if it helps u ...
what ever values u r storing in database just make one trend ...inserta ll values in one case ..choose ..upper case or lower case ...
and when u search for ...any word change the type of string in same case which u choosed for at the time of inserting .....
this works fine ..Iam running it for a nice search may user fill upper or lower it works fine...
regds
sandeep
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sandeep,
Your approach will work. But this can't be applied everywhere. For example in my case (email management system) where following customer info is to be stored:
Customer name.
Emailaddress.
Greeting.
etc.
Customer will not agree to change the name for example from 'Sandeep Balyan' to sandeep balyan'.
Anyway thanks for all your inputs and keep updated if something new comes up
 
sandeep balyan
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friend IAm not telling u to say u r user to change write according to u ..
C do one thing
U must be taking u r values from a form ..
and taking in jsp using.or any thing u must be doing .by
String A=request.getParameter ...Method...
after taking a value in variable..just use
exp..
String B=A.toUpperCase();
and than save to database it will be always in same case may u r user enter in any case..
I think so this wiil help u ..
regds
sandeep
 
shikhar singh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sandeep,
Agreed with your point. But my question is:
Definitely you can store the data as you want (in uppercase or lowercase). But what about retriveing and displaying the data.
User has entered 'JaVa'. Server componeny has changed and persisted it as 'JAVA'.
But how will you retrieve it back and display it as 'JaVa'.
 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic