Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Spooling to a .LST file
In article <876tpg$ip0$1_at_nnrp1.deja.com>,
Jonus <zuin_chn_at_my-deja.com> wrote:
> Anyone know how to spool the results of of a script into a .lst file?
>
> --
> Someone pass a cork to plug the hole in my head
>
Hello Jonus,
to spool a single sql Statement, use spool filename.suffix
and after the Statement spool off.
To spool the result of a script use
set serveroutput on size 100000 -- dets the screen buffer spo filename.suffix
declare
v_count number;
begin
select count (*)
into v_count
from tablename;
dbms_output.put_line('Your Text: '||to_char(v_count));
end;
/
spool off
You need the dbms_output Package to spool it out. And before that you have to set the serveroutput on.
HTH Detlev
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Feb 01 2000 - 00:00:00 CST
![]() |
![]() |