By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 883 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

Case Insensitivity not working with character(255) data type

P: 1
Scenario is

"select * from table1 where name ='Anand Vihar'
name is a field having datatype as character(255)

To Ask:
Now user can enter as Anand Vihar,anand vihar,AnaND viHAR any way
so how would i achieve case insensitivity when this datatype is used it works fine when datatype is text(ilike is solving for the same ) but for this case what should i do and don't want to search like Anand Vihar ATM match should be exact but with case insensitivity
Apr 2 '12 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 700
try like this
Expand|Select|Wrap|Line Numbers
  1. select * from table1 where trim(name) ilike 'Anand Vihar'
  2.  
Apr 3 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.