sql_language thread: RE: sql_language digest: April 20, 2001; case sensitive SQL like
If you are using SQL2000, you are supposed to be able to set things like
case sensitivity down to the column level. I don't think that the usual
workaround (cast everything to binary and then compare) works with LIKE.
HTH,
Darin Strait, MS SQL Server Development and Administration
http://home.earthlink.net/~dstrait/professional/resume.htm
----- Original Message -----
From: "Bernard Omiple" <BernardO@a...>
To: "sql language" <sql_language@p...>
Cc: <Paul.Broomfield@t...>
Sent: Saturday, April 21, 2001 12:08 AM
Subject: [sql_language] RE: sql_language digest: April 20, 2001; case
sensitive SQL like
> If you're using SQL Server...
>
> Have you tried setting a case-sensitive sort order when you installed SQL
> Server?
> You can check what sort order is set in your SQL server using sp_helpsort
> in Query Analyzer.
> If the sort order installed is not case-sensitive, you may have to rebuild
> the master database which is quite delicate and must be handled really
> carefully - you know what I mean - especially if you already have lots of
> user-defined databases installed; but it can be done.
>
> Setting a case-sensitive sort order makes all sorting and string
> comparisons case-sensitive for all databases installed in your server.
>
>
> If you don't want to fiddle with the sort order, I have an idea but I have
> not tested this yet.
> You may create a procedure that compares the binary values character for
> character in character strings.
> This makes search operations run slower, though.
>
>
> Hope this helps...
>
>
> Bernard
>
>
>
>
>
> Subject: Case Sensitive SQL LIKE
> From: "Paul Broomfield" <Paul.Broomfield@t...>
> Date: Fri, 20 Apr 2001 12:54:52 +0100
> X-Message-Number: 2
>
> Hi,
>
> I asked this a little while ago - got an answer back but it didn't work.
>
> What I want to be able to do is make SQL LIKE case sensitive.
>
> The field type I am comparing is ntext, I have tried using CONVERT but I'm
> not having much luck.
>
> Has anyone got any pointers?
>
> Thanks
> Paul
>
>