Is it possible to do a query so it ORDERS BY one column if it has a value and another if not?
Basically I want to pull out a list in the order of column A or B.
Now column A will always have a value, B not so.
Any thoughts?
Cheers
My thoughts are I don't really understand what your trying to do.
But here's what I *think* your trying to do.
(SELECT cols FROM TABLE WHERE A != nulll ORDER BY A) UNION
(SELECT cols FROM TABLE WHERE A=null ORDER BY B)