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

Thread: SQL Report - Need Output

  1. #1
    Join Date
    Nov 2001
    Location
    New Brunswick, NJ
    Posts
    67

    Smile

    Hello,

    I'm writing an SQL report which may or may not have results, but I want the header/title to print out either way.

    Is there a way to force the header/title to print regardless of whether the SQL pulls any data?

    Thanks,

    Paul

  2. #2
    Join Date
    Nov 2001
    Location
    New Brunswick, NJ
    Posts
    67
    This works (kind of).

    Select something from dual and then do a noprint on that. Below is a workaround.

    ttitle center 'testing'
    column x noprint
    select 'x' x from dual;

    /* Now have the main query */
    select * from dept where deptno=77;

    Top title will appear even if no rows are selected.


    Only problem my second select statement produces a second set of page headings. There has to be a better way.
    P


    [Edited by mrpaulwass on 06-24-2002 at 11:35 AM]

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