Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Spooling to a .LST file

Re: Spooling to a .LST file

From: <moerkd_at_my-deja.com>
Date: 2000/02/01
Message-ID: <8770kl$ksk$1@nnrp1.deja.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US