Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Order by rownum???

541081Oct 14 2007 — edited Oct 14 2007

Hello all

I got a sql query with this result:

Priority	Kind		Unit_Id
100		Department	50
100		Group		58
40		Department	50
1		Group		46
1		Group		47
1		Department	48
100		Department	59
100		Group		60
40		Department	61
100		Department	12
100		Group		63
40		Department	64

I need to order the rows by:
The highest priority from each Department,
The second Highest from each Department,
Etc…
There is no meaning to the priority number only for inside the department order.
After I get all the department rows, I need to do the same for the groups.

How can it be done?

Cris

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2007
Added on Oct 14 2007
9 comments
728 views