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: How to format a column from code.

Re: How to format a column from code.

From: Holger Baer <holger.baer_at_science-computing.de>
Date: Thu, 25 Aug 2005 09:11:41 +0200
Message-ID: <dejqvj$d3n$1@news.BelWue.DE>


Chuck wrote:
> With sqlplus I can do "COL mycol FORMAT 999,999,999" to format long
> numbers with commas.
>
> How can I do this from within code? Do I need to just select the column
> and then use logic in the code to reformat the numbers?
>
> Thx,
> CC
>

Chuck,

your question lacks vital informations: what is the client you're planning to run this code from? If it's interactive SQL*Plus, then the answers in this thread are correct. However, since you specifically talk about code, I hope you realize that to_char will actually take a number and turn it into a different datatype. If it's for display use only, you're probably fine. But if you're planing to use that number any further, sooner or later you're going to end up in a mess.

Holger Received on Thu Aug 25 2005 - 02:11:41 CDT

Original text of this message

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