Link to home
Start Free TrialLog in
Avatar of anushahanna
anushahannaFlag for United States of America

asked on

varbinary in equality condition

when i run the foll, i get a bunch of valid users, right?
select * from sysusers a, master..syslogins b where a.sid = b.sid

I copied one of the SIDs and pasted it below like
select * from master..syslogins where sid = '0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE'

but i get blank output. why is this?

thanks
ASKER CERTIFIED SOLUTION
Avatar of Daniel Reynolds
Daniel Reynolds
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
select * from master..syslogins where sid = suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')
pass login name in SUSER_SID
Avatar of anushahanna

ASKER

xDJR1875, that worked. thanks.
VjSoft, the foll is bringing blank..
select * from master..syslogins where sid = suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')

whereas
select * from master..syslogins where sid = 0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE
brings the output.
suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')

is not correct, I wrote it by mistake, see my next post, that will work,
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
beautiful. thanks many.