Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 data comparing

Author  Topic 

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-01-18 : 00:29:39
hi,

i want to write a query for data comparing

as for example in case of password if i write where condition as

WHERE PASSWORD= @PASSWORD

in data in database is in upper case and if i compare data which is in lower case it shold not accept

how i can write query to above condition

Malathi Rao

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-18 : 01:33:47
where convert(varbinary, password) = convert(varbinary, @password)

where password collate <some collations with CS> = @password <some collations with CS>


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhuotp
Yak Posting Veteran

78 Posts

Posted - 2007-01-18 : 03:11:45
and if u want permanently make your database case sensitive, then u need to change the collation.

Madhu
Go to Top of Page

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-01-18 : 04:07:17
Thank You Peso

Your Soltion is working and easy

Malathi Rao
Go to Top of Page

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-01-18 : 04:08:39
Madhu

i did't get you

Malathi Rao
Go to Top of Page
   

- Advertisement -