Solved

varbinary in equality condition

Posted on 2010-08-26
8
275 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
  • 4
  • 3
8 Comments
 
LVL 17

Accepted Solution

by:
xDJR1875 earned 250 total points
Comment Utility
Don't put it in quotes
0
 
LVL 8

Expert Comment

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

Expert Comment

by:Mohit Vijay
Comment Utility
pass login name in SUSER_SID
0
 
LVL 6

Author Comment

by:anushahanna
Comment Utility
xDJR1875, that worked. thanks.
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 6

Author Comment

by:anushahanna
Comment Utility
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
Comment Utility
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 250 total points
Comment Utility
example

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

Author Comment

by:anushahanna
Comment Utility
beautiful. thanks many.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now