Could you use a cursors in PL/SQL? Then you could order the results and put them together if that's appropriate.