Hi everyone,
I am trying to use order by and CASE to avoid using dynamic sql in stored procs.
when i use
order by
case when x then col1
case when y then col2
end
it works.
but if i want to order by more than 1 column,
like this
case
when x then col1,col2
when y then col1
end
this doesn't work. can anyone help me.
Thanks