↧
Answer by Matt Whitfield
You can do it one of two ways - the lame way and the good way.The lame way would be to do something likeSELECT sno, sub1Pass + sub2Pass + sub3Pass + sub4Pass + sub5Pass as SubjectsPassed FROM ( SELECT...
View ArticleAnswer by John Franklin
Assuming a temp table named #Grades, here is an example using the UNPIVOT functionality... --- Subjects Failed Per Student SELECT SNO, FAILED_SUBJECTS_COUNT = COUNT(*) FROM ( SELECT SNO, SUB1, SUB2,...
View Article