Alan Fitch
SELECT * FROM (SELECT tranid FROM transaction where type='SalesOrd' group by tranid) ORDER BY tranid