SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Case Sensitive Problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kwikwisi
Constraint Violating Yak Guru

280 Posts

Posted - 04/07/2008 :  11:00:19  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

India
5564 Posts

Posted - 04/07/2008 :  11:01:52  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote
Please post your query.

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

kwikwisi
Constraint Violating Yak Guru

280 Posts

Posted - 04/07/2008 :  11:11:21  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

India
5564 Posts

Posted - 04/07/2008 :  11:14:42  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote
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

280 Posts

Posted - 04/07/2008 :  12:10:03  Show Profile  Reply with Quote
hi

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

harsh_athalye
Flowing Fount of Yak Knowledge

India
5564 Posts

Posted - 04/07/2008 :  12:15:26  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote
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

280 Posts

Posted - 04/07/2008 :  12:17:04  Show Profile  Reply with Quote
Thanks for your warm help.
Go to Top of Page

Jeff Moden
Aged Yak Warrior

USA
649 Posts

Posted - 04/13/2008 :  20:43:48  Show Profile  Reply with Quote
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... http://www.sqlservercentral.com/articles/Best Practices/61537/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000