I am trying to modify a query so that I get different output depending on a specific value in one of the fields. The query is something I found elsewhere and modified it to output a list of classes by course groups - like:
Now I need to have a different display only when the group level is 600 it will show something like:
I know I need a case but can't figure out how to incorporate that into my existing query - though I've been trying. In the real query, I"m building some HTML but I've eliminated that here for the sake of clarity. Anything that gives me alternate output for the 600 level will give me enough to work with. The original query is attached.
Many thanks in advance.
SELECT g.groupNum, 0 AS classId, g.groupName AS Description
FROM tbl_AdultEd_ClassGroups g where g.groupDisplay=1
SELECT c.groupNum, c.classID, c.className AS Description
FROM tbl_AdultEd_Classes c
ORDER BY groupNum, classId