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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Printing a spool under SQL*Plus

Re: Printing a spool under SQL*Plus

From: thoidi8 <xiongh_at_hotmail.com>
Date: 1997/12/17
Message-ID: <Pine.A41.3.95.971217142510.152006A-100000@f1n11.spenet.wfu.edu>#1/1

hi CB,

Thanks for your Help.
I would like to create a trigger with some of you idea, as the following;

CREATE OR REPLACE TRIGGER get_this_data
AFTER UPDATE ON my_table
DECLARE
 CURSOR c1 IS
   SELECT my_field
   FROM my_table;
 my_rec c1%ROWTYPE;
BEGIN
 OPEN c1;
 LOOP
   FETCH c1 INTO my_rec;
   EXIT WHEN c1%NOTFOUND;
   INSERT INTO my_view_table
   VALUES (my_rec.my_field);
   SPOOL /export/home/my_datafile.lst
   SELECT *
        FROM my_view_table;
   SPOOL OFF
 END LOOP;
END;
/

The following is sqlplus;
SQL> @get_fy
CREATE OR REPLACE TRIGGER get_this_data
*
ERROR at line 1:
ORA-06550: line 15, column 10:
PLS-00103: Encountered the symbol "/" when expecting one of the following: := . ( @ % ;

ORA-06550: line 16, column 4:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the
following:
Received on Wed Dec 17 1997 - 00:00:00 CST

Original text of this message

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