Hi,
We're rewriting our CMS at the moment and we want our clients to be able to re-order items in a table using a "position" field. So, if they mark an items as position 1 it goes at the top, then position 2 underneath it etc.
The problem is that we don't want to them to have to fill in a position every time, only if they want to re-order something so the position field will often be blank. So you might have the following...
Car - 1
Bike - 2
House
Computer
Dog
This causes a problem because if you use the following SQL...
SELECT ProductName FROM Products ORDER BY Position DESC;
All the blank ones go to the top, not the bottom.
Can they be put into the correct order using a SQL statement?