You are viewing a single comment's thread. Return to all comments →
what is the use of using decode
Using decode, you order by marks only when the name is NULL.
that's genius man
good one. i just did "Order by grade desc, name asc, marks asc" because there was not rule tha tmarks should be be sorted ascending otherwise so you do not really need the Decode rule. I used a temp teable to store the internal results first