Re: sqlplus - compute sum of (colA - colB) on report

From: Richard Booker <rbooker_at_21stcentury.net>
Date: Thu, 21 Mar 2002 18:23:19 -0600
Message-ID: <3C9A7977.177A34F6_at_21stcentury.net>


Thanks a lot and I will.

Ed prochak wrote:

> My suggested changes are in lower case:
>
> Richard Booker <rbooker_at_21stcentury.net> wrote in message news:<3C99CEB6.2820EF5F_at_21stcentury.net>...
> > First and foremost, thanks to all of you for providing and contributing
> > to such a useful resource as this newsgroup.
> >
> > I am trying to include on a report a grand total of the results of
> > subtracting one column's value from another.
> >
> > Below is my best effort. Any help will be greatly appreciated.
> >
> > SPOOL M:\CCMIS\SQL\REPORT_OF_SUBMITTED_BILLINGS.TXT
> > TTITLE 'LIST OF SUBMITTED BILLINGS'
> > BREAK ON DEL_AGENCY ON REPORT SKIP 2
> > COMPUTE SUM OF (AMT_BEFOREACCESS - ACCESS_FEE) ON REPORT
> compute sum of difference on report
> > SET PAGESIZE 60
> > SET LINESIZE 150
> > SET NEWPAGE 2
> > SELECT
> > DEL_AGENCY,
> > SITE_NAME,
> > AMT_BEFOREACCESS - ACCESS_FEE
> (AMT_BEFOREACCESS - ACCESS_FEE) as difference
> > FROM BILLINGS_HEADER
> > WHERE MONTH = '02' AND YEAR = '2002' AND SUBMIT_FLAG = 'Y'
> > ORDER BY DEL_AGENCY;
> > CLEAR COLUMNS
> > CLEAR BREAKS
> > CLEAR COMPUTES
> > TTITLE OFF
> > SPOOL OFF
> >
> > Thanks again.
>
> next time, please give a description of the problem. Don't forget to
> mention what version of ORACLE you are using.
>
> --
> Edward J. Prochak --- Magic Interface, Ltd.
> Ofc: 440-498-3700
> on the web at --- http://www.magicinterface.com
> email: ed.prochak_at_magicinterface.com
Received on Fri Mar 22 2002 - 01:23:19 CET

Original text of this message