SQL statement question...

From: Jimmy <c6635500_at_comp.polyu.edu.hk>
Date: Tue, 11 May 1999 07:34:37 -0700
Message-ID: <37383FFD.219D56F0_at_comp.polyu.edu.hk>



[Quoted] Hello all,

[Quoted]     I have a table with column A of number data type.     I want to select column A and convert A values to char type as follows:

    select to_char(A) from table order by A

    However, I find that the column A cannot display in order. This is because after the function to_char, the order is in character, not in number. So I get the following results:

    1,11,12,2,22,23 ... not 1,2,11,22,23...

[Quoted]     How can I get the above results (order by A numeric value and convert to character data type) by using a single SQL statement?

Thanks,
Jimmy Received on Tue May 11 1999 - 16:34:37 CEST

Original text of this message