Re: Sorting a column
mailtome wrote:
> SELECT col FROM foo
> ORDER BY col REGEXP "^[^0-9]", col+0, col
>
> This query works while sorting in ascending order
> While SELECT col FROM foo
> ORDER BY col REGEXP "^[^0-9]", col+0, col DESC
> doesnt works :(
The DESC in your query oly works on the last ORDER BY option. You'll have to add them to your other options too:
ORDER BY col REGEXP "^[^0-9]" DESC, col+0 DESC, col DESC
Depending on your requirements, you might even want to change the order of the options.
--
felix
Subject
Written By
Posted
Re: Sorting a column
April 15, 2005 02:04AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.