Solved

varbinary in equality condition

Posted on 2010-08-26
8
285 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:
Daniel Reynolds earned 250 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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 250 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

821 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