PIVOT two columns SQL Server -
i've been trying use pivot feature query how not able find solution. below main table criteria.
evaluationid criteria overallrating 1 c1 bad 2 c2
now each criteria has few questions , answers.
id evaluationid questiontext ratingtext 1 1 q1 unsatisfactory 2 1 q2 unsatisfactory 3 1 q3 unsatisfactory 4 2 q4 bad 5 2 q5
my desired result below.
evaluationid question answer question answer question answer 1 q1 unsati.. q2 unsati.. q3 unsati.. 2 q4 bad q5 null null
important aspect here there multiple criteria , number of questions in each criteria can vary.
can help?
thanks
wiki
Comments
Post a Comment