If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > case insensitive search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-10, 07:53
lodha13 lodha13 is offline
Registered User
 
Join Date: Apr 2010
Posts: 10
case insensitive search

how case insensitive search is done.
like in table there are
"a"
"A"
then both should come when condition is ="a"
Reply With Quote
  #2 (permalink)  
Old 04-06-10, 23:30
rayqsl rayqsl is offline
Registered User
 
Join Date: Jan 2010
Posts: 18
Quote:
Originally Posted by lodha13 View Post
how case insensitive search is done.
like in table there are
"a"
"A"
then both should come when condition is ="a"
I haven't used informix. But if it is case sensitive in the matching (like Oracle is) then you need to shift everything to the correct case.

So if you want to see if everything starts with 'A' and 'a' then it's something like:

select * from <table> where upper(columnname) like 'A%'

If you're comparing against a variable, it's more or less the same:

select * from <table> where upper(columnname) = upper(varname).

Reply With Quote
  #3 (permalink)  
Old 04-08-10, 16:42
Tyveleyn Tyveleyn is offline
Registered User
 
Join Date: Aug 2006
Location: The Netherlands
Posts: 248
Or use the MATCHES operator with the regular expression like operand:
Code:
WHERE column MATCHES '[Ss][Tr][Ii][Nn][Gg]'
Regards,
Hans
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On