| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: [Help] How to sort like this with SQL?
Hi,
I have used the following SQL to convert all numeric fields so that they are two characters logn, after wich I believe You would get the right results (assuming that each field has max 2 numbers).
select Work_Item
from Work_Table
order by
substr (
replace (
replace (
replace (
replace (
replace (
replace (
replace (
replace (
replace (
replace (
replace (
'.' || replace (Work_Item,'.','..'),
'.0.','.00.'),
'.1.', '.01.'),
'.2.', '.02.'),
'.3.', '.03.'),
'.4.', '.04.'),
'.5.', '.05.'),
'.6.', '.06.'),
'.7.', '.07.'),
I hope this helps
Greetings,
Toni Received on Mon Jan 22 1996 - 01:34:01 CST
![]() |
![]() |