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!

Need Query Urgently ....

10268116Nov 12 2008 — edited Nov 21 2008
Gurus,

Here is a table which is having following dataset :

LMN Abc Router
Abc 10000 Series Router
12000 Series Router
Abc 9900 Series Router
500 Series Router
Abc 8900 Series Router
490 Series Router
Abc 7600 Series Router
Abc 6600 Series Router
DEF Abc Router
Abc ABC Type Router
Abc LMN Type Router
450 Series Router

The output which is required is as follows :
Output
===============
12000 Series Router
500 Series Router
490 Series Router
450 Series Router

Abc 10000 Series Router
Abc 9900 Series Router
Abc 8900 Series Router
Abc 7600 Series Router
Abc 6600 Series Router

Abc ABC Type Router
Abc LMN Type Router

DEF Abc Router
LMN Abc Router

There is a logic behid this sort as the first set is sorted in Numeric Descending
Second data set is sorted in string 'Abc' with Numeric descending
Third set does not have any numeric characters but is sorted in Asceding order

I've used regexp_substr for sort in numeric but unble to achieve second sort logic.

Help Appreciated.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2008
Added on Nov 12 2008
22 comments
849 views