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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

order in a connect by

Rosario VigilanteJul 15 2010 — edited Dec 9 2010
hello to all

having
stat   LEVEL c
...
...
1	2	Urologia(43)
1	3	Visita generale urologica(VURO)
1	4	201043000103-17/06/2010
1	3	Visita urologia successiva(VUROC)
1	4	201043000230-08/07/2010

get from a query 
...
..
ORDER SIBLINGS BY c 
How can I get result ordered in desc only when level = 4
that is,
ORDER SIBLINGS BY c ,  case when LEVEL= 4 then c  desc end      /*substr(c, 18,23)  end*/
return error ORA-00976: LEVEL, PRIOR, or ROWNUM not allowed here

This is result set I would like to get
stat   lev    c
...
...
1	2	Urologia(43)

1	3	Visita urologia successiva(VUROC)
1	4	201043000230-08/07/2010     -- first (desc ordered)

1	3	Visita generale urologica(VURO)
1	4	201043000103-17/06/2010
Thanks in advance

Edited by: Rosario Vigilante on Jul 15, 2010 11:27 AM

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 13 2010
Added on Jul 15 2010
4 comments
12,192 views