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: Jerry Gitomer <jgitomer_at_p3.net>
Date: 1998/02/05
Message-ID: <34D95BE4.91D@p3.net>#1/1

Hi,

By any chance did you specify the DESCending option? If you did and you are sorting a CHAR, VARCHAR, or VARCHAR2 Oracle is delivering what you asked for since the data is left justified. If I remember correctly you should be able to use a TO_NUMBER function and get the results you are seeking. If that doesn't work you might want to try the LPAD function using "0" as the pad character.

Regards

Jerry

HTrieu wrote:
>
> I want to create a pl-sql report ordering output from dba_segments by
> number of extents...I have 3 tables in one tablespace that have 100 extents
> and the order by clause is sorting these incorrectly. IE if there are 6 tables
> as follows:
>
> tab1 3
> tab2 5
> tab3 8
> tab4 101
> tab5 9
> tab6 88
>
> The output of the order by clause is
>
> tab5 9
> tab3 8
> tab6 88
> tab2 5
> tab1 3
> tab4 101
>
> HELP and thanks!
Received on Thu Feb 05 1998 - 00:00:00 CST

Original text of this message

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