Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Controling number of digits displayed

Re: Controling number of digits displayed

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Tue, 22 Aug 2000 14:42:08 GMT
Message-ID: <39A29140.8FCB5775@edcmail.cr.usgs.gov>

Try
  SET COLUMN columnname FORMAT 99999
This will display only five digits. If you want a decimal point:   SET COLUMN columnname FORMAT 99999.9
If you want a comma:
  SET COLUMN columnname FORMAT 99,999.99

HTH,
Brian

jimbob4334_at_my-deja.com wrote:
>
> I am trying to get the columns with the
> sum calculations in them to display only five
> digits. I have not been able to get set numf
> to work and could not figure out how to do
> it using COLUMN format.
>
> Any help would be appreciated.
>
> I am running:
> Connected to:
> Oracle7 Server Release 7.3.3.0.0 - Production Release
> With the distributed, replication and parallel query options
> PL/SQL Release 2.3.3.0.0 - Production
>
> set pagesize 10000
> set newpage 2
> set escape on
> set MAXDATA 60000
> set ARRAYSIZE 1
> set linesize 100
> set TRIMS on
> set head off
> set feedback off
> set verify off
>
> define prod = '&1'
> define database = '&2'
> define field_length = '&3'
> define release = '&4'
> define list_file = '&5'
>
> define FS = "|| chr(9) ||"
>
> spool &list_file
>
> select
> PRODUCT_ID &FS
> substr(RELEASE_ID,1,&field_length) &FS
> SUM(MAJ_TOT)/SUM(AMT_INSP) &FS
> SUM(MIN_TOT)/SUM(AMT_INSP) &FS
> SUM(MAJ_TOT) &FS
> SUM(MIN_TOT) &FS
> SUM(AMT_INSP)
> from INSP."&database\_MASTER", INSP."&database\_SUMMARY"
> where
> INSP."&database\_MASTER".INSP_ID = INSP."&database\_SUMMARY".INSP_ID
> and (INSP_TYPE = 'CODE')
> and (RELEASE_ID Like '&release%')
> and (PRODUCT_ID = '&prod')
> group by
> PRODUCT_ID,
> substr(RELEASE_ID, 1,&field_length)
> /
> spool off
> quit
> --
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
 

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Tue Aug 22 2000 - 09:42:08 CDT

Original text of this message

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