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: Is there a way to use "COLUMN FORMAT" in a Pro*C/C++ app?

Re: Is there a way to use "COLUMN FORMAT" in a Pro*C/C++ app?

From: sybrandb <sybrandb_at_gmail.com>
Date: 2 Apr 2007 00:41:00 -0700
Message-ID: <1175499660.251986.293300@e65g2000hsc.googlegroups.com>


On Apr 2, 7:50 am, "Ramon F Herrera" <r..._at_conexus.net> wrote:
> My application has some SQL statements like this:
>
> SELECT
> to_char(amount1, '99,999,990.00'), \
> to_char(amount2, '99,999,990.00'), \
> to_char(amount3, '99,999,990.00'), \
> to_char(amount4, '99,999,990.00'),
> [...]
>
> Is that the only way to format real numbers from a precompiler
> application?
>
> The command "COLUMN FORMAT" seems to work only from SQL*Plus.
>
> TIA,
>
> -Ramon F Herrera

The COLUMN command is a sql*plus command, it isn't a SQL command. So yes, it is the only way.
Obviously you could define the format as a string constant, but it seems you prefer hardcoding and maintenance nightmares.

--
Sybrand Bakker
Senior Oracle DBA
Received on Mon Apr 02 2007 - 02:41:00 CDT

Original text of this message

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