|
-
Mar 22nd, 2002, 01:42 AM
#1
Max of Bit sort of
I have a usergroup table that has a bunch of bit values for each options in it. I was trying to think what to do if a user belongs to more than one group and I was wondering how I could write a query or stored procedure that gives me the The True statement in each option?
Data like this:
GROUPNAME,HIRE,TERM,PAYROLL, CASH
Admin,True (1),True (1),True (1), True (1)
Guest,True (1), False (0), False (0), True (1)
Standard, True (1), True (1),False (0), False (0)
Now what I want is lets say a user belongs to Guest and Standard then it should return:
Combined,True (1), True (1), False (0), True (1)
Can this be done in SQL? Or should I just get the values and work the rest out in code?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|