Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Users and Roles list out from one query ..

Author  Topic 

sonnysingh
Starting Member

42 Posts

Posted - 2005-05-12 : 09:19:00
Hi Folks

I have this query for user and roles from sysuers and sysmember table.. i want user name will be in separate column and roles in separate coulmn means two columns by running same query..

Please help....



SELECT a.name
FROM db_2_3.dbo.sysusers a INNER JOIN
db_2_3.dbo.sysmembers b ON a.uid <> b.memberuid
WHERE (a.name NOT LIKE 'db%') AND (a.name NOT IN ('guest', 'public'))



Thanx in advance



SqlIndia
   

- Advertisement -