?
Solved

varbinary in equality condition

Posted on 2010-08-26
8
Medium Priority
?
306 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:anushahanna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 17

Accepted Solution

by:
Daniel Reynolds earned 1000 total points
ID: 33534571
Don't put it in quotes
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33534684
select * from master..syslogins where sid = suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33534699
pass login name in SUSER_SID
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Author Comment

by:anushahanna
ID: 33534844
xDJR1875, that worked. thanks.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33534854
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.
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33534875
suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')

is not correct, I wrote it by mistake, see my next post, that will work,
0
 
LVL 8

Assisted Solution

by:Mohit Vijay
Mohit Vijay earned 1000 total points
ID: 33534888
example

select * from master..syslogins where sid = suser_sid('sa')
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33534986
beautiful. thanks many.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question