Re: SQL*Plus report formatting

From: Matt B. <gtimatt_at_home.com>
Date: Thu, 13 Sep 2001 01:21:38 GMT
Message-ID: <CSTn7.1529$RS3.849762_at_news1.elcjn1.sdca.home.com>


[Quoted] "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 Thu Sep 13 2001 - 03:21:38 CEST

Original text of this message