I have the following table: tb_answers
The table structure is as follows
ID | QUESTIONID | SURVEYID | LEAGUEID | MEMBERID | ANSWER | DATEADDED | DIVISIONID
Sample data
302347 | 2336 | 172 | 146 | 68 | 467 Vallie Lane | 2012-05-21 16:36:22.433 | 0
302350 | 2340 | 172 | 146 | 68 | 591 | 2012-05-21 16:36:22.483 591
I need to present this data as follows.
DYNNAMIC LIST OF QUESTION#QUESTIONID# | MEMBERID | DIVISION
DYNNAMIC LIST OF VALUES OF QUESTION#QUESTIONID#|#MEMBERID#|DIVISION
So I can sort by the value of QUESTION#QUESTIONID#
This possible? I'm not good with pivot and union, so any help is appreciated.