Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Printing a spool under SQL*Plus
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
![]() |
![]() |