Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*Plus report formatting
"Jon Schlatter" <*jon-schlatter_at_stamats.com> wrote in message
news:tpf2879kjbqm8c_at_corp.supernews.com...
> I tried the TO_NUMBER as described, but cannot get it to work properly.
> Here is a brief view of my select statement, maybe you can correct my error.
>
> SELECT P.CUSTOMER_REF,P.JOB_MANAGER_REF, P.PROJECT_NO, TO_NUMBER(P.JOB_NO,
> '99')
IIRC, TO_NUMBER is one argument only. Just feed it P_JOB_NO. TO_NUMBER is for converting strings to numbers so that it can be evaluated as a number in any boolean conditions, in order-bys, etc. For formatting the output to two digits you need to use the "column" and "format" commands. It's been ages and my memory's fuzzy on this one, but it's something like (before your SQL statement) this:
column p_job_no format 99
-Matt Received on Wed Sep 12 2001 - 20:21:38 CDT
![]() |
![]() |