-
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
-
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
-
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."

-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|