May 3, 2006 at 6:43 am
How can I do a case sensitive search? I only want to return results that match 'DEFAULT' not all that have 'Default'
WHERE (fac = 'DEFAULT')
May 3, 2006 at 7:26 am
Try the link below to get started. Hope this helps.
http://vyaskn.tripod.com/case_sensitive_search_in_sql_server.htm
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
May 3, 2006 at 7:49 am
hi,
if your server is case-sensitive then your where clause will only find rows that match "DEFAULT". If your server is case-insensitive then use one of the solutions from the document.
hope this helps
Paul
May 3, 2006 at 10:45 pm
hey thatz quite simple...
just follow this way...
where upper(fac) = upper(watever here)
or
where lower(fac) = lower(watever here)
May 3, 2006 at 10:45 pm
hey thatz quite simple...
just follow this way...
where upper(fac) = upper(watever here)
or
where lower(fac) = lower(watever here)
May 4, 2006 at 6:34 am
Have you actually tested this solution Riyaz???
May 4, 2006 at 10:28 am
May 4, 2006 at 10:44 am
Try without the upper.
See any difference??
May 4, 2006 at 10:54 am
I do on a server with a case sensitive collation setting.
My point was that no matter what collation is selected, the query will result in a match when using UPPER() or LOWER() and that Riyaz' advice will never work. In order to do a case sensitive match one of the options previously mentioned should be used if the collation setting is insensitive.
May 4, 2006 at 6:15 pm
hey mate...wat i had posted will do a perfect insensitive search...
but will affect urs...
sorry should have read ur description clearly...
i ve now read...but again the solution is simple
try this...
where cast(fac as binary) = cast('DEFAULT' as binary)
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply