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.
Author |
Topic |
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-04-07 : 11:00:19
|
HiI 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 AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-04-07 : 11:11:21
|
create procedure sp_procedure1@username nvarchar(50),@userid int outputasselect @userid=UserIDfrom USERwhere username=@UserName |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-04-07 : 11:14:42
|
Try this:select @userid=UserIDfrom USERwhere username = @UserName collate Latin1_General_BIN Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-04-07 : 12:10:03
|
hiCan u tell me what's Latin1_General_BIN coz i never seen this.Thanks. |
|
|
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 AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
kwikwisi
Constraint Violating Yak Guru
283 Posts |
Posted - 2008-04-07 : 12:17:04
|
Thanks for your warm help. |
|
|
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] |
|
|
|
|
|