Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Self defined sort order in SELECT
Hello,
is there any possibility to sort the result of a select-statement by self defined rules, before the result is passed to the application? For example:
SELECT client, emp_status, Name FROM table ORDER BY client ASC, emp_status ASC returns:
General Motors | Employee | Mr. Smith General Motors | Member of Board | Mr. Doe General Motors | Secratary | Mrs. Easy Kellogs | Employee | Mr. Bush Kellogs | Member of Board | Mr. Kerry Porsche | Employee | Mr. Snyder Porsche | Member of Board | Mrs. Porsche Porsche | Secratary | Mrs. Nice
but I would like to have the result displayed like this:
General Motors | Member of Board | Mr. Doe General Motors | Employee | Mr. Smith General Motors | Secratary | Mrs. Easy Kellogs | Member of Board | Mr. Kerry Kellogs | Employee | Mr. Bush Porsche | Member of Board | Mrs. Porsche Porsche | Employee | Mr. Snyder Porsche | Secratary | Mrs. Nice
Thank you for every good advise!
Tibor Received on Fri Sep 10 2004 - 08:55:49 CDT
![]() |
![]() |