QUESTION POSED ON: 12 January 2009
I am trying to use a CASE expression in the ORDER BY clause of my SQL statement, but I want to order by more than one column. I keep getting a "missing keyword" error when I try to compile this.
ORDER BY
CASE WHEN sortorder = 1 THEN x
WHEN sortorder = 2 THEN x,y
END;
"sortorder" is a variable I pass in, by the way.
|