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 Problem

Author  Topic 

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2008-04-07 : 11:00:19
Hi

I want to check whether user exits in database or not(with case sensitive)
With my query ,both username with Mark and mark can login.
i want to check case sensitive.

Plz help me!

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-07 : 11:01:52
Please post your query.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2008-04-07 : 11:11:21
create procedure sp_procedure1
@username nvarchar(50),@userid int output
as
select @userid=UserID
from USER
where username=@UserName
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-07 : 11:14:42
Try this:

select  @userid=UserID
from USER
where username = @UserName collate Latin1_General_BIN


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2008-04-07 : 12:10:03
hi

Can u tell me what's Latin1_General_BIN coz i never seen this.
Thanks.
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-07 : 12:15:26
It is a name of collation which determines the sort order and string comparison. You can read about them in SQL server help.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

kwikwisi
Constraint Violating Yak Guru

283 Posts

Posted - 2008-04-07 : 12:17:04
Thanks for your warm help.
Go to Top of Page

Jeff Moden
Aged Yak Warrior

652 Posts

Posted - 2008-04-13 : 20:43:48
Lookup "collation" for this.

--Jeff Moden
"Your lack of planning DOES constitute an emergency on my part... SO PLAN BETTER! "
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row"

For better, quicker answers, click on the following... [url]http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]
Go to Top of Page
   

- Advertisement -