Let me explain: I need to sort a list in ascending order, while results leave less than zero at the end.
Example:
**Field**
2
5
15
19
0
-5
-19
I think I can join result of two queries using UNION, but I want to do using only one, is it possible?
Any answer telling how to order thay way will be appreciated.
Use the following ORDER BY at the end of your normal query (no union)
Or, if your database system’s SQL flavor supports implicit conversion of booleans to integers: