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: division in a select statement

Re: division in a select statement

From: <karsten_schmidt8891_at_my-deja.com>
Date: Wed, 20 Oct 1999 09:57:13 GMT
Message-ID: <7uk3lm$sk4$1@nnrp1.deja.com>


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

Original text of this message

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