Forum Discussion
gancw1
3 years agoResolver II
Unpivot table
I have a quiz result in the following format Name id Q1 1 Q2 1 Staff A 102 TRUE 1 FALSE 0 Staff B 222 FALSE 0 FALSE 0 Staff C 312 TRUE 1 TRUE 1 How do I unp...
HotChilli
3 years agoCommunity Champion
The columns with 0 and 1 in are redundant so you could remove those.
Then Select the first 2 columns and Unpivot others.
If you want, you can add a custom column to represent TRUE/FALSE as 1/0
- gancw13 years agoResolver II
The true/false has no relation to the 1/0. It just happened that for these questions the true answer is the correct answer