0

From the following question,

SQL server ignore case in a where expression

Is it possible with Oracle?

Also, is it possible to compare "your,text" with "your text"?

I want to convert All characters other than A-Z0-9 into space and then compare the string.

I can do it by Java methods through regex but don't prefer writing unecessary code.

Community
  • 1
  • 1
Ankit
  • 425
  • 1
  • 5
  • 21
  • For another way, see examples of NLS_SORT and NLS_COMP at http://stackoverflow.com/questions/6682173/oracle-search-text-with-non-english-characters/6684663#6684663 – Shannon Severance Oct 31 '11 at 19:49

1 Answers1

2

Yes, with the UPPER() function.

select whatever from your_table where UPPER(col) = UPPER('YourText');

(Or LOWER() if you prefer that.)

Performance warning: that won't play well with indexes, unless you've indexed on UPPER(col) also and are careful with NULLs.

Mat
  • 202,337
  • 40
  • 393
  • 406