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
 General SQL Server Forums
 Script Library
 New solution to question from Eric

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-26 : 09:40:42
Koen writes "Hi,

I think I found a solution to the following problem posted by Eric :

"
Today's question comes from Eric:

I was just wondering if there is a way to get an exact comparison of two strings. I am specifically concerned with the case of the strings..."

In SQL2000 I created a login stored procedure :

CREATE PROCEDURE Rp_LoginUser
@Login char(3),
@Password char(20)
AS
Select acID
from rpAccount
where acLogin=@Login and acPassword=@password collate Latin1_General_CS_AS
GO

By adding the 'collate' option, I made the sort-order of the acPassword column to be case-sensitive !!
This seems to work !"
   

- Advertisement -