Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sorting Using ORDER BY CLAUSE

Re: Sorting Using ORDER BY CLAUSE

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1998/02/04
Message-ID: <34d8eb16.32107881@www.sigov.si>#1/1

On 4 Feb 1998 21:08:43 GMT, htrieu_at_aol.com (HTrieu) wrote:

> ...[SNIP]...
>The output of the order by clause is
>
>tab5 9
>tab3 8
>tab6 88
>tab2 5
>tab1 3
>tab4 101
>
>HELP and thanks!

Obviously your order by is applied to a VARCHAR column in descending order. If you want to order by its numeric values, use the TO_NUMBER function, i.e.
  .... ORDER BY TO_NUMBER(my_varchar) DESC;

Regards,


Jurij Modic                             Republic of Slovenia
jurij.modic_at_mf.sigov.mail.si		Ministry of Finance
============================================================
The above opinions are mine and do not represent any official standpoints of my employer Received on Wed Feb 04 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US