Case sensitive datatypes

Case sensitive datatypes

Post by Paul Stephenso » Thu, 15 Jan 1998 04:00:00



Can anyone tell me how to create a case sensitive char or varchar datatype?
That is, one where ("Hello" = "hello") is false in a where clause etc.

From what I see, support is there with the CASE_SENSITIVE attribute as seen
in sp_datatype_info, but all the system types have this set to 0. Also it
appears that user-defined datatypes can be merely 'aliases' for existing
ones. Is this correct or am I missing something? I haven't seen the topic
addressed anywhere on this newsgroup or the Web.

Thanks,

Paul Stephenson

 
 
 

Case sensitive datatypes

Post by Rolf Tesm » Fri, 16 Jan 1998 04:00:00


Paul, there is only one way to set this option and that is at SQL
Server installation time. It looks as though you have chosen the
default of Dictionary Order - Case Insensitive. This means that
"HELLO" = "hello".

To correct this you will have to rebuild your MASTER database, no easy
task.

If you were to install Case Sensitive remember that not only is your
data case sensite but also your metadata (which is a painful feature).
So any SQL statements that refer to a table called "Employee" as
"employee" will return a object not found message.

On Wed, 14 Jan 1998 11:03:45 GMT, "Paul Stephenson"


>Can anyone tell me how to create a case sensitive char or varchar datatype?
>That is, one where ("Hello" = "hello") is false in a where clause etc.

>From what I see, support is there with the CASE_SENSITIVE attribute as seen
>in sp_datatype_info, but all the system types have this set to 0. Also it
>appears that user-defined datatypes can be merely 'aliases' for existing
>ones. Is this correct or am I missing something? I haven't seen the topic
>addressed anywhere on this newsgroup or the Web.

>Thanks,

>Paul Stephenson

Rolf Tesmer,
SQL Server Database Administrator,
BHP Information Technology,
Melbourne, Victoria, Australia.