I have a question about spooling the the results of my program. My sample sql script looks like this.
whenever sqlerror exit failure rollback
set heading off
set arraysize 1
set newpage 0
set pages 0
set feedback off
set echo off
set verify off
declare
ab varchar2(10) := 'Raj';
cd varchar2(10);
a number := 10;
c number;
d number;
begin
c := a+10;
select ab,c into cd,d from dual;
end;
SPOOL
select cd,d from dual;
SPOOL OFF
EXIT;
The above script does not work, but I want to do something like this where in the begin end block we compute some values and i want to spool those results.
Thanks.