[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: ORDER BY



Chuck,
Try using DECODE, as in:

ORDER BY
DECODE(YourColumnName,'1',1,'1SL',2,'1SM',3,'1UP',4,'100',5,'197',6,'198',7,'199',8,'1000',9)

Jim

At 03:17 PM 03/14/2001 -0800, you wrote:
>Hello!
>   I am trying to use an order by clause on a char field, but the order
>doesn't come out quite like the customer wanted.  For example, I have the
>values: 1,1SL,1SM,1UP,100,197,198,199 and 1000.  The order by clause in SQR
>produces the following order:
>
>1
>100
>197
>198
>199
>1SL
>1SM
>1UP
>1000
>
>I would like the order to be 1,1SL,1UP,100,197,198,199,100.  Does anyone
>have any suggestions?
>
>Thank you,
>   Chuck