Re: Sorting a column
mailtome wrote:
> I have a varchar column say Issue with data as
> follow
>
> 900
> 1100
> update
> test
> 800
>
> Now I want to sort this column
>
> Can anyone tell me the correct way to sot this
> column
The correct way is to not mix numerical and text data in the same column. The ORDER BY sorting of a VARCHAR is alphabetical, not numerical.
But you could use
SELECT col FROM foo
ORDER BY col REGEXP "^[^0-9]", col+0, col
--
felix
Subject
Written By
Posted
Re: Sorting a column
April 09, 2005 03:27AM
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.