• oliveraustin (1/28/2014)


    Ah ha, thought how to reduce the problem size down to 12 groups 🙂

    Since the Roles with multiple groups consist of<=12 groups and the rest of the all I need to to do is filter the LDAP data and reduce it those entries that are in the set of groups that are part of multi group roles!...yippeee

    Original problem is

    A role consists of between 1 and x groups from a set of x groups.

    A role can only have a particular group once.

    A user may have more than one role

    Example:

    Role | Group

    Helpdesk | Password Reset

    Security | Password Reset,

    Security | Enable User

    Reception | Enable User

    Reception | Disable User

    The data I have is of the form

    User | Group

    SmithA | Password Reset

    SmithA | Enable User

    BloggsJ | Password Reset

    MouseM | Enable User

    MouseM | Disable User

    From that I need to deduce the users have the following roles

    User | Role

    SmithA | Security

    BloggsJ | Helpdesk

    MouseM | Reception

    Thanks

    So does this mean you have a suitable solution now?


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St