Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Simple PL/SQL Report - Using Break on and Compute Sum - Not So Simple

704983Jun 5 2009 — edited Jun 5 2009
Good morning, All:

I have a simple pl/sql report that is not so simple. Basic on the code below, would like to add a blank line/row after the resulting "sum" row to make it easier to read. Any and all help would be appreciated.

Thank you.

Preston@Large

Code:
=======================
BREAK ON ALM_OG_CAMPAIGN_CODE
COMPUTE SUM OF ALM_OG_AMOUNT ON ALM_OG_CAMPAIGN_CODE


set linesize 1024
set pagesize 60
set newpage 0
set serveroutput on

SPOOL &so_outfile;
ttitle center 'Wayne State University' skip 1 Left 'WSU Online Giving Essentials Report' skip 2
select TO_CHAR(sysdate, 'mm/dd/yyyy hh:mm AM') "Report Date" from dual;

CLEAR COLUMNS
column ALM_OG_ACCI_CODE heading "ACCI|CODE" format a10

column ALM_OG_AMOUNT heading "AMOUNT|DONATED" format $999,999,999.99

column ALM_OG_CAMPAIGN_CODE heading "CAMPAIGN|CODE" format a14


select


ALM_OG_CAMPAIGN_CODE,
ALM_OG_ACCI_CODE,
ALM_OG_AMOUNT

From WSUALUMNI.WSU_ONLINE_GIVING_TABLE
ORDER BY ALM_OG_CAMPAIGN_CODE;

CLEAR COLUMNS


/
spool off



Output:

WSU Online Giving Essentials Report



Report Date
======================
06/05/2009 10:06 AM


1 row selected.
Wayne State University
WSU Online Giving Essentials Report


CAMPAIGN ACCI AMOUNT
CODE CODE DONATED
====== ======== ==========


sum $560.00
NUR 444814 $10.00
***** =======
sum $10.00
PHS 445216 $10.00
***** =======
sum $10.00
PRES 445211 $450.00
445211 $60.00
445211 $250.00
***** =======
sum $760.00
SBA 444216 $10.00
***** =======
sum $10.00
SSW 444469 $10.00
***** =======
sum $10.00
This post has been answered by SanjayRs on Jun 5 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2009
Added on Jun 5 2009
3 comments
1,437 views