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)
 Reg Case sensitive search

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-18 : 21:12:46
Ramakrishna writes "Here for my application, I want to have case sensitive comparision to Password field in my sql server 7 database. I tried to do it by converting both values to binary using CONVERT function. But that is not working. Sort used for my SQL server is Case-insensitive dictionary, Is there any way to get out of this problem.This is the query I used.

select * from LoginData where CONVERT(varbinary,Password)=CONVERT(varbinary,'simra')"

Nazim
A custom title

1408 Posts

Posted - 2002-02-18 : 23:15:12
your query wouldnt have worked coz of thee varbinary length in your call to Convert function

Alyways remember if your column data type is nvarchar specify its double size in varbinary.
eg: if password column size is 50 , this should help you

select * from LoginData where CONVERT(varbinary(100),Password)=CONVERT(varbinary(100),'simra')"


--------------------------------------------------------------
"Happiness is not something you experience, it's something you remember."
Go to Top of Page
   

- Advertisement -