Order By

From: Chino <chino81_at_gmail.com>
Date: 19 Apr 2006 17:33:26 -0700
Message-ID: <1145493206.840780.247720_at_i39g2000cwa.googlegroups.com>



Hi everyone,

I have a query where i am returning a property which is a string. I am trying to perform the following:

*NB: Note the position of of the try_itemcode value 002240-10

The sort order i want to achieve:
Order by clause?

002238-1
002239-1
002240-1
002240-2
002240-3
002240-4
002240-5
002240-6
002240-7
002240-8
002240-9
002240-10

The current sort order:
Order by clause - select try_itemcode from trays order by try_itemcode

002238-1
002239-1
002240-1
002240-10
002240-2
002240-3
002240-4
002240-5
002240-6
002240-7
002240-8
002240-9

The unsuccessful attempt sort order:
*NB: 002240-10 doesn't even appear below as it is returned further down
in the resultset
Order by clause - select try_itemcode from trays order by length(try_itemcode),try_itemcode

002238-1
002239-1
002240-1
002240-2
002240-3
002240-4
002240-5
002240-6
002240-7
002240-8
002240-9

Any help would be appreciated!

Kind regards,
Ino Received on Thu Apr 20 2006 - 02:33:26 CEST

Original text of this message