Table:
Date = 20120101, ID = 123456, ParentID = 654321, System1 = 1, System2 = 1
User can be active in System1, System2, or both (1 = true, 0 = false). Query needs to output as follows:
System1 System2
1 0 "System1", "All"
0 1 "System2", "All"
1 1 "System1", "System2", "All"
0 0 "All"
I was trying a case statement but I couldn’t get it to output how I wanted.
I’m getting the idea that you want to generate multiple rows for each row in your data.
If so, the following does this: