PL/SQL simple report - using break on and calculation amount - not so Simple

Hello, all:

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

Thank you.

Preston@large

Code:
=======================
BREAK ON ALM_OG_CAMPAIGN_CODE
CALCULATE SUM OF THE ALM_OG_AMOUNT ON ALM_OG_CAMPAIGN_CODE


set linesize 1024
set pagesize 60
NewPage 0 value
Set serveroutput on

COIL & so_outfile;
TTITLE Center "Wayne State University" jump jump "WSU online giving Essentials Report" left 1 2
Select TO_CHAR (sysdate, ' dd/mm/yyyy hh: mm AM') 'Date of Report' of the double;

CLEAR COLUMN
ALM_OG_ACCI_CODE column header "ACCI | CODE' format a10

the title of ALM_OG_AMOUNT column ' AMOUNT '. GIFT"format $999,999,999.99

ALM_OG_CAMPAIGN_CODE column header "CAMPAIGN | CODE' format a14


Select


ALM_OG_CAMPAIGN_CODE,
ALM_OG_ACCI_CODE,
ALM_OG_AMOUNT

Of WSUALUMNI. WSU_ONLINE_GIVING_TABLE
ORDER BY ALM_OG_CAMPAIGN_CODE;

CLEAR COLUMN


/
spool off



Output:

Report on the essential online giving WSU



Date of report
======================
05/06/2009 10:06


1 selected line.
Wayne State University
Report on the essential online giving WSU


AMOUNT OF CAMPAIGN ACCI
A GIVEN CODE CODE FACT
====== ======== ==========


$ 560.00
NUR $444814 10.00
***** =======
$ 10.00
PHS $445216 10.00
***** =======
$ 10.00
ABOUT $445211 450.00
$445211 60.00
$445211 250.00
***** =======
$ 760.00
SBA $444216 10.00
***** =======
$ 10.00
SSW $444469 10.00
***** =======
$ 10.00

Prestone,

Welcome to the Forum!

I have used skip 2 lines you can use 1
SQL> break on job report skip 2
SQL> compute sum of sal on job report
SQL> select job , sal from emp order by job ;

JOB              SAL
--------- ----------
ANALYST         3000
                3000
********* ----------
sum             6000

CLERK           1300
                 950
                 800
                1100
********* ----------
sum             4150

MANAGER         2850
                2975
                2450
********* ----------
sum             8275

PRESIDENT       5000
********* ----------
sum             5000

SALESMAN        1500
                1250
                1250
                1600
********* ----------
sum             5600

14 rows selected.

READ
Quick SQL * Plus Guide
http://download.Oracle.com/docs/CD/B14117_01/server.101/b12171/TOC.htm
SQL * more reference
http://download.Oracle.com/docs/CD/B14117_01/server.101/b12170/TOC.htm

SS

Tags: Database

Similar Questions

  • I use microsoft vista and I can not find my webcam to any help

    I use Microsoft vista and I can not find my webcam to any help

    I use Microsoft vista and I can not find my webcam to any help

    Huh?

    Related topics

  • I use Windows 7 and I am not able to print several different images on a single page.

    When I try to print photos from the 'My pictures' library, I use the following steps:

    1. turn the photo highlight

    2. click on 'print '.

    3. in the window that says: "How do you want to print your photos? I choose the number of photos I want per page, for example 3 x 5.

    4. when I try to add a picture DIFFERENT from my library so that I can print several different photos on this page of photos of 3 x 5, it simply replaces the previous photo. How can I get there?

    Thank you.

    Original title: I use Windows 7 and I am not able to print several different images on a single page. The answer posted here from 8/11 includes a link that does not work.

    Hello

    Welcome to the community of Microsoft and thanks for posting the question. I've surely you will help find a solution on the issue.

    What program you want to use?

    We will try to print in a different way and check.
     
    Open Paint and then do a collage of different photos then save it then open it in their program and print.
     

    To print the image in Microsoft Paint, steps to follow:

    a. Click Start, in the search box, type in the paint.

    b. open the document you want to print.

    c. select print and check.

     

    With the help of paint

    http://Windows.Microsoft.com/en-us/Windows7/using-paint

     
    Hope this information helps. Please reply back with the
  • I use the proxy and I can not install any software test Adob via Creative cloud because the installed CC said: no internet connection. What can I do?

    I use the proxy and I can not install any software test Adob via Creative cloud because the installed CC said: no internet connection. What can I do?

    Hello

    Can you please follow the instructions below.

    1. Click on the link below and open Photoshop Elements download link.

    Note: We are not anything downloaded from the page of Photoshop Elements.

    Do not close the page, just keep it open.

    Download Photoshop Elements products | 10, 11, 12, 13

    2. then click on the link below and download the installer directly mentioned in step 2.

    • for windows

    http://prodesigntools.com/trials3/AdobeProducts/LTRM/6/Win64/Lightroom_6_LS11.exe

    • for mac

    http://prodesigntools.com/trials3/AdobeProducts/LTRM/6/OSX10/Lightroom_6_LS11.dmg



    You can run the installation file once the download is complete.

    Hope this will solve your problem.

    Kind regards

    Hervé Khare

  • Error 16? I use windows 8 and I do not know how to solve.

    error 16? I use windows 8 and I do not know how to solve.

    See here:

    Configuration error. CC, CS

  • Error rings using codes.txt and error do not allow entries parameter as rings custom error message?

    The ring of the error is very useful, especially with its parameterized inputs, you can specific with %s, %f and %d parameters.  I would do the same thing in my error codes fixed using the ring of the error so that I can locate them in several languages, but it seems that LabVIEW files text Project never error codes detect or accept parameter entries, you get a ring of the error, but no input parameter.  If you use the same string in a client error code, it gives the setting entry but then his hard-coded and you can not locate it.  What gives?

    Is there another way to configure the rings of error to use a project file for the error codes but still supports parameter entries?

    Thank you Esteban but I think you're confusing what I'm asking.  The ring of the error is for the treatment of custom error codes.  Built in UNITS in the project files error may not take parameters, while that of custom, those who can.  See my screenshot.

  • HP Officejet 4620: hpeprint used to work and now does not work

    I've registered to use hpeprint for a number of years and it has worked very well, although I don't use it very often. I had the opportunity to use it today and it doesn't seem to work. The printer is wireless and is great for everything else is not a local problem for me. I received an email from HP indicating that the print job has been received in too. Still not printing.

    Thank you very much for your help!

    PS Subsequent investigations said that "I have not all registered devices! Then when I put my claim code in the to add it again, the message says:

    "The request window that has already expired. Click on "what is a claim code?" below for instructions on how to print the fact sheet Web Services for re - activate the code request for 48 hours. »

    that I don't really understand! Sorry for being a thicko!

    Hey @JimRobinBSc,

    Welcome to the Forums of HP Support!

    I see that you have some problems with ePrint on your Officejet 4620 e-all-in-one printer. I can help you with that.

    First, a code of request is a way for HP connected connect a printer to an account. It has no use outside. That said, if the printer does not appear in the devices on the connected HP, this means that we connect the printer again. To do:

    1. On the printer, click the web services button that looks like a tablet with a phone beside her.
    2. If you see an email address click settings, scroll to remove Web Services and press on this subject to be deleted. When finished, click the web services button again.
    3. Press Setup and Yes. The printer should print a new claim code.
    4. Enter the claim code in the place under the devices tab which requires the claim code.

    Please let me know if this allows you to use ePrint or if you have any other questions. If not, have a great week!

    If it solves your problem, please help other users find this thread by clicking on accept Solution below my post.

    If you appreciate my help, please inform other users by clicking on the icon below my post thumbs up.

  • DVD RW drive has an error code of registry 19. I can't use the drive and it is not visible as a drive.

    My lite - on dvdrw lh-20a1l ata device does not work.  Device Manager appears with the following text:

    Windows cannot start this hardware device because its information of configuration (in the registry) is incomplete or damaged. (Code 19)

    Click on 'Search for solutions' to send data about this device to Microsoft and to see if there is a solution available.

    I tried looking for solutions, uninstall driver and reboot, reinstall the software provided with the machine, running regecure software to clean the registry and nothing has solved the problem so far - you have ideas?

    19 code means there is a driver conflict such as two devices attempt to use the same
    resources.

    Step 1: Please do all the same underneath if you did some before as is often total
    a process that solves the problem.

    Try this - Panel - Device Manager - CD/DVD - double click on the device - driver tab.
    Click on update drivers (this will probably do nothing) - RIGHT click ON the drive - uninstall.
    RESTART this will refresh the default driver stack. Even if the reader does not appear to continue
    below.

    Then, work your way through these - don't forget the drive might be bad, could be a coward
    cable or slight corrosion on the contacts (usually for a laptop) and other issues.

    Your CD or DVD drive is missing or is not recognized by Windows or other programs
    http://support.microsoft.com/kb/314060 - a Mr Fixit

    The CD drive or the DVD drive does not work as expected on a computer that you upgraded to
    for Windows Vista
    http://support.Microsoft.com/kb/929461

    When you insert a CD or a DVD, Windows Vista may not recognize the disc
    http://support.Microsoft.com/kb/939052

    Your CD or DVD drive cannot read or write media - A Mr Fixit
    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    CD/DVD drive does not appear in Windows Vista, or you receive this error in Windows
    Vista installation after booting from the DVD (AHCI)
    http://support.Microsoft.com/kb/952951
    Drive CD - R or CD - RW Drive is not recognized as a recordable device
    http://support.Microsoft.com/kb/316529/

    Hardware devices not detected or not working - A Mr Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    Another possibility is that the cables are loose. Remove ALL power, then check the cables
    both ends. Remove and replace, do not just tight. For laptops, you can often clean the
    power and data of the contacts with a pencil eraser.

    Some DVD players do not use the Windows default drivers so check with the system manufacturer
    and the manufacturer of the device to see if there is a firmware or drivers for your drive if necessary.

    ===============================

    Step 2: You have disc problems as the CD/DVD is actually 4 discs in 1 case (CD &)
    Burn DVDs and CDs and read DVDs). So it is not unusual for 1 or 2 operational parts while
    others do it properly.

    Did you follow the Troubleshooting Guide for the reader who still does not work? There are
    the entries in registry that the troubleshooter does not solve and those who "might" be the cause.

    Check with your Maker system and a device for the two possible firmware updates and
    the correct registry entries for your car.

    Here are the keys that I of course are those in question - for the subkeys of the CD/DVD drive
    as there will be other subkeys in these keys. Do not forget to ask specific keys involved as well as
    the parameters.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ {4D36E965-E325-11CE-BFC1-08002BE10318}

    -----------------------------------------------------------------------

    You can probably find more info here and maybe even the exact registry for your CD/DVD settings
    drive from someone with the same model.

    Forums - a lot of expert real help
    http://Club.myce.com/

    CD/DVD units
    http://www.myce.com/storage/

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • screen goes black and moves randomly please explain answer in detail as I use windows 10 and I can not understand the answers already given

    screen turns black and moves randomly when using most of the tools of photoshop.  I use windows 10 and cannot follow the above.

    Hi Nodstown,

    Greetings.

    • What version of PS do you use?
    • Mac or Windows, which version?
    • There may be several reasons for this.
      • Preferences corrupt.
      • Obsolete graphics drivers.
    • Solution
      • Try resetting the PS tools. (See screenshot)
      • Try resetting the PS preferences - to restore preferences quickly by using a keyboard shortcut: press and hold Alt + Ctrl + Shift (Windows) or Option + command + shift (Mac OS) when you start Photoshop. You are prompted to delete the current settings.

    Concerning

    Rohit

  • using Windows vista and supported will not start

    Windows vista help and support will not start. Is it possible to download and re - install this feature.

    In addition to the guidance of Kim, I also recommend looking at responses MVP mind x here.

  • SQL how to use a variable and use the result as a reference for the name of the table

    Hi all

    I have new in the declaration of Oracle, sorry in advance if something is easy for you all. BTW, I have this scenario:

    I have a table OL structured in this way:

    Date - it contains dates, for example 11/01/2015

    TableName - it contains strings, for example, OL1, OL2, OL3 and so on...

    Then I have a different table, the name of these tables are of the same name in the table of the OL, so I have table table, OL1, OL2, OL3 table and so on. The structure of these tables is the same. And Yes.

    table OL1

    ---------------------------------------------------------------

    ID LAST NAME FIRST NAME PHONE

    ---------------------------------------------------------------

    1 JOHN DOE 12345679

    2 PAUL 111111122 TIBBS

    table OL2

    ---------------------------------------------------------------

    ID LAST NAME FIRST NAME PHONE

    ---------------------------------------------------------------

    1 ANNA KRAIG (NULL)

    NATHAN FRESHMANN 111111133 2

    If the scenario is clear, I would like to retrieve the value (null), research in all the OL * tables by using the value of the OL table (tablename) max.

    If I'm going to do these simple steps, I got the result:

    Select max (TableName) OL

    the result will be OL2

    # I know not how to use the option set to avoid changing the table name in the sql statement all the time.

    set mytable = 'OL2.

    Select Name, family name

    of & mytable

    When the phone is null

    Any idea?

    Thank you very much in advance.

    Hello

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    bulk collect into v_result_set

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null';

    dbms_output.put_line (v_ol);

    end;

    Correct the code such as:

    run immediately "select dt.log_id, obj.presentation_name, dl.begin_time

    of ' | v_ol |' dt join internal ol_object obj on

    DT.object_type_id = obj.object_type_id

    inner join ol_chunk_log dl on

    DT.log_id = DL.log_id

    where dt.data_value is null' bulk collect into v_result_set;


    for i in v_result_set.first ... v_result_set. Last

    loop

    dbms_output.put_line ('LOG ID: ' | ) ( v_result_set.log_id (i)) ;

    dbms_output.put_line (' NAME CLOSELY: ' |) v_result_set.presentation_name (i));

    dbms_output.put_line (' START TIME: ' |) ( v_result_set.begin_time (i)) ;

    end loop;

    end;

    Kind regards.

  • Column headings on PL/SQL return SQL Query report using < br >

    Hello
    I want to create a report region based on a function that returns a SQL query. As a dem oI created the following:
    create or replace function xxjk_retsql return varchar2
    as
    begin
    return 'select i "column header" from wwv_flow_dual100';
    end;
    I want to be able to insert a line break in the column heading so that it wraps to two lines. I tried this:
    create or replace function xxjk_retsql return varchar2
    as
    begin
    return 'select i "column<br>header" from wwv_flow_dual100';
    end;
    However, when the region is rendered, it seems to strip on the HTML tag. I also tried another tag, < i > < / i >, as a test and it is deleted also.



    Is it possible to include a pause in a header of column in this way?


    Thank you

    Hello:

    On the attributes page choose "pl/sql" for the field type.
    For the pl/sql function, write something like

    return 'top1
    bottom:top2
    bottom2:.........';

    CITY

  • I want to dowload thunderbird to receive my meails but it keeps using old data and I can not set up to receive on POP I tried this many times automatic

    I want to download Thunderbird to receive my emails from my ISP VirginMedia.
    How ever this automatic program beacue, I can't any howmanytimes I try to accept that
    I don't want IMAP, I need to use POP because its all the auto matic I don't even get the box to make these changes.
    It is possibole for you athunderbird to stop this, so I can use this program.
    If Itry to change it does not accept my correct address of VM

    Noreen Evans

    If you want to start over and delete what Thunderbird has already.
    Close Thunderbird
    on the start menu type %appdata%\protector.exe
    in the Explorer, delete the Thunderbird folder
    launch Thunderbird.

  • How can I download Youtube videos on my mac? Real used to work and it does not longer.

    I can't download YouTube more. I have FF 20.0 and use mac os x 10.8. Real used to work, but no more.

    Hello tabarsi, you can use one of the many extensions available in addons.mozilla.org.

  • Satellite Pro L650: cannot use Skype - cam and microphone are not connected

    Having problems connecting to Skype.
    It seems that the microphone and web cam are not connected.
    Skype self-test will not respond with the voice test.

    Hello

    Have you checked the Skype settings?

    There, you should check if the right microphone and the internal webcam have been chosen.

    By the way: is the webcam properly recognized in Device Manager?

    You can use the webcam using the preinstalled software webcam?

Maybe you are looking for