Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: division in a select statement
Hi,
select to_char(unit_price / 10000, '09999999.99$') from price_table;
check out the online-documentation on technet.oracle.com for details on format models for the to_char function.
in sqlplus use the set numformat to define the global format model.
Karsten
In article <_s6P3.626$j4.31139_at_news.uswest.net>,
"Larry Pettit" <larry.pettit_at_ps.net> wrote:
> I'm doing division in a select statement on one of the fields in a
table of
> a view. It's defined as a number with nothing to the right of the
decimal.
> Is there a way to redefine the column for display purposes so that the
> column value isn't truncated?
>
> select unit_price / 10000 from price table
>
> If unit price is less then 10000 it will show a zero.
>
> Thanks
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Oct 20 1999 - 04:57:13 CDT