DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Output

  1. #1
    Join Date
    Jul 2001
    Posts
    334

    Output

    Hi,
    I need little help to resolve this issue.I am working on a SQL*PLUS report. Let's consider the table

    TABLE VALUES
    VENDOR INVOICE PAYMENT
    ------ ------- -------
    101 001 3,400.00
    101 002 1,205.90
    101 003 5000.00
    789 005 1000.00
    789 006 2300.00
    415 007 59.09
    415 008 700.00
    415 009 845.00

    in SQL*Plus I am using
    BREAK ON vendor SKIP 1
    COMPUTE SUM OF payment ON vendor
    so what happining, it printing the report result as below format, which is correct.
    VENDOR INVOICE PAYMENT
    ------ ------- -------
    101 001 3,400.00
    002 1,205.90
    003 5,000.00
    *** --------
    9,605.90

    789 005 1,000.00
    006 2,300.00
    *** --------
    3,300.00

    415 007 59.09
    008 700.00
    009 845.00
    *** --------
    1,604.09

    But I need the output in the below layout, how I can manage it?
    VENDOR INVOICE PAYMENT
    ------ ------- -------
    101 001 3,400.00
    101 002 1,205.90
    101 003 5,000.00
    --------
    9,605.90

    789 005 1,000.00
    789 006 2,300.00
    --------
    3,300.00

    415 007 59.09
    415 008 700.00
    415 009 845.00
    --------
    1,604.09


    Thanks in advance.

  2. #2
    Join Date
    Jan 2002
    Posts
    57
    Try:
    break on vendor skip 1 dup

    This can be found in the SQL*Plus Users Guide on OTN.

    When I do that, and the compute sum I get:

    scott@DEVL> select * from x order by vendor;

    VEN INV PAYMENT
    --- --- ----------
    101 001 3400
    101 003 5000
    101 002 1205.9
    *** ----------
    sum 9605.9

    415 007 59.09
    415 008 700
    415 009 845
    *** ----------
    sum 1604.09

    789 005 1000
    789 006 2300
    *** ----------
    sum 3300

    --
    Paul

  3. #3
    Join Date
    Jul 2001
    Posts
    334
    How cool, It works perfect.
    Thanks for your time and help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width