sql server - sql query for convert(varbinary, [login]) -


i have sql query check permission of user

select column 1 ,column 2 ,column 3  ,column 4 usertable convert(varbinary, [login]) = convert(varbinary, 'demo_rbc')  

this query doesnt return reocrd though table has entry demo_rbc .the same query works other string demo_bdca or demo_avm.

is there specific reason why demo_rbc string doesnt work in comparision of clause.is there better wat check login criteria.

you can collation, ie collate sql_latin1_general_cp1_cs_as

here sample demonstrate:

declare @var nvarchar(max) set @var = 'hello'  select 1 'hello' collate sql_latin1_general_cp1_cs_as = @var  set @var = 'hello'  select 1 'hello' collate sql_latin1_general_cp1_cs_as = @var 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -