Wednesday, 28 August 2013

SQL Query to retrieve Multiple Users and Groups

SQL Query to retrieve Multiple Users and Groups

Here is my problem: I presently have a table that contains rows with
groups and their users.
So each row contains an AD group with the user assigned.
A user can be in multiple AD groups. A group can contain multiple users.
The table has 7000 rows. The table has 600 different AD groups.
So here is what I need to do: I must divide this data in 10-15 batch that
contains AD Groups and Users.
These batch must have all the users for the groups selected. And the users
must not be part of another group not selected.
How can I do this with SQL Queries.
If need be I can separate the data and de-normalise it in multiple tables.
SQL Server 2008 R2
Alexis

No comments:

Post a Comment