• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

case insensitive search in Oracle

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to fire SQL query which searches a string in particular column in case insensitive manner with Oracle database. In mysql like '%searchString%' works fine. But oracle does return results from the same case.
PLEASE HELP...
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
convert searchString to upper case then query like
upper(column name) like '%serachString%'
Veena
 
Author
Posts: 93
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bhiku Mhatre:
How to fire SQL query which searches a string in particular column in case insensitive manner with Oracle database. In mysql like '%searchString%' works fine. But oracle does return results from the same case.
PLEASE HELP...


Veena, is right however make sure you do UPPER() call on both sides of the SQL statement.
UPPER(col_name) like UPPER('%COL_NAME%');
Otherwise you are only converting to uppercase on the data retrieved and does not guarantee that the search string you are looking for is also upper cased.
Thanks,
John
 
Bhiku Mhatre
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help..
Regards,
Bhiku.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic