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)
 Case Sensitive Select

Author  Topic 

Mannga
Yak Posting Veteran

70 Posts

Posted - 2004-06-02 : 06:52:50
Hi all,

I am retrieving a single cahracter from a SQL table (SQL 2000) using the substring method and then checking it against a value that has been passed in as follows


DECLARE @Check as char(1)
SET @Check = (SELECT TOP 1 substring(WebPassword,@T1,1) As 'PasswordLength' from Logon L, LogonPassword LP where
L.LogonRefNo = LP.LogonRefNo
and
L.LogonRefCode = @LogonRefCode)
IF @Check <> @S1
SET @Result = 1


But now they are passing in Y and y is returning okay. How do I get around this?

Thanks,
Gavin

Amethystium
Aged Yak Warrior

701 Posts

Posted - 2004-06-02 : 06:56:12
Maybe the ascii() function might be of use to you.

_________________________________________________________
The cradle of civilisation will defeat the new monsters of the world.
Go to Top of Page

Mannga
Yak Posting Veteran

70 Posts

Posted - 2004-06-02 : 07:06:30
Superb, and quick too

Cheers,
Works perfectly.
Go to Top of Page
   

- Advertisement -