Home All Groups Group Topic Archive Search About

Case-Sensitive Text Comparissons

Author
8 Sep 2006 4:09 PM
Alex Maghen
I like the current configuration of my SQLServer instance which, I guess,
does case-INSENSITIVE text comparissons. However, inside a few of my
StoredProcedures, I need to specifically do case-SENSITIVE text comparissons.
If I want to do something like:
  ...where(@SomeVar = SomeColumn)
and have this be case-sensitive, how do I do that?

Thanks.

Alex

Author
8 Sep 2006 4:29 PM
Harsh Athalye
Use collate clause to specify Case-Sensitive collation (CS):

where (@SomeVar collate SQL_Latin1_General_CP1_CS_AS = SomeColumn collate
SQL_Latin1_General_CP1_CS_AS)
--
Regards,
Harsh Athalye
"Nothing is impossible"


Show quote
"Alex Maghen" wrote:

> I like the current configuration of my SQLServer instance which, I guess,
> does case-INSENSITIVE text comparissons. However, inside a few of my
> StoredProcedures, I need to specifically do case-SENSITIVE text comparissons.
> If I want to do something like:
>   ...where(@SomeVar = SomeColumn)
> and have this be case-sensitive, how do I do that?
>
> Thanks.
>
> Alex
>

AddThis Social Bookmark Button