Conditional PIVOT/transform problem
- by IanC
Hi folks
I have a table with three columns, which we'll call ID1, ID2, and Value.
Sample data:
ID ID1 Value
1 1 0
1 2 1
1 3 1
1 3 2
1 4 0
1 4 1
1 5 0
1 5 2
2 1 2
Value is limited to 0, 1, or 2.
What I need to do is pivot/transform this data into a column-based count of how many times each possible Value…