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

Thread: leading empty row

  1. #1
    Join Date
    Mar 2001
    Posts
    287

    leading empty row

    I am using the following script to create a report. For some reason, there is always one leading empty row and one trailing row. How do I get rid of them?

    set head off
    set feedback off

    spool c:\my_report..txt
    select e.hash_value,
    (e.buffer_gets-b.buffer_gets) Total,
    (e.executions -b.executions) EXECS
    from stats$sql_summary b,stats$sql_summary e
    where
    b.snap_id=&&b_snap_id
    and e.snap_id=&&e_snap_id
    and e.hash_value=b.hash_value
    order by (e.buffer_gets-b.buffer_gets) desc
    /
    spool off

  2. #2
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    409
    If you are just trying to get rid of empty rows in result sets, Try this :

    Code:
    select e.hash_value,
    (e.buffer_gets-b.buffer_gets) Total,
    (e.executions -b.executions) EXECS
    from stats$sql_summary b,stats$sql_summary e
    where 
    b.snap_id=&&b_snap_id 
    and e.snap_id=&&e_snap_id 
    and e.hash_value=b.hash_value
    and e.hash_value is not null 
    order by (e.buffer_gets-b.buffer_gets) desc
    HTH.
    -- Dilip

  3. #3
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796

    Re: leading empty row

    Originally posted by dba_admin
    I am using the following script to create a report. For some reason, there is always one leading empty row and one trailing row. How do I get rid of them?

    set head off
    set feedback off

    spool c:\my_report..txt
    select e.hash_value,
    (e.buffer_gets-b.buffer_gets) Total,
    (e.executions -b.executions) EXECS
    from stats$sql_summary b,stats$sql_summary e
    where
    b.snap_id=&&b_snap_id
    and e.snap_id=&&e_snap_id
    and e.hash_value=b.hash_value
    order by (e.buffer_gets-b.buffer_gets) desc
    /
    spool off
    set pages 0
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  4. #4
    Join Date
    Mar 2001
    Posts
    287
    Thank you.

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