Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Self defined sort order in SELECT

Self defined sort order in SELECT

From: Tibor Jager <tibor_at_despammed.com>
Date: 10 Sep 2004 13:55:49 GMT
Message-ID: <2qdq35FttuboU1@uni-berlin.de>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US