SQL is based on set theory so does it not have a have native concept of order. In other words, if you do a SELECT without an "ORDER BY" clause, then the database can return the records in any order it feels like. The order may even change between runs of the same SELECT.
To get around this, use an "ORDER BY" clause to order the result set. For example:
SELECT qty, descript, price
FROM mytable
WHERE qty > 0
ORDER BY price DESC, descript;
-- Michael
Darkstreak Computing & Innovations
www.darkstreak.com