Quote:
Originally posted by aloe9451
Thanks for replying.
Here is my code:
SPOOL test_file
dbms_output.put_line(rec_spe.mkt_seqnum || ',' || rec_spe.market_id);
SPOOL OFF;
I got error for the above code, it complains that I am using SPOOL there.
Your help will be much appreciated.
|
SPOOL is a SQL Plus command, it means nothing inside a PL/SQL block (it is a syntax error there).
Do this:
SQL> SPOOL test_file
SQL> BEGIN -- PL/SQL begins
...
49 dbms_output.put_line(rec_spe.mkt_seqnum || ',' || rec_spe.market_id);
...
98 END; -- PL/SQL ends
99 /
PL/SQL procedure successfully completed.
SQL> SPOOL OFF