Hello again, i'm trying tu create and run a procedure in pl/sql and i'm getting some errors that can resolve. I need to create a procedure wich fetch all tables of the schema and then insert the data of each table into a global data table wich contains all the data of the other ones.
CREATE OR REPLACE PROCEDURE DM_DATA IS
CURSOR all_tables IS
SELECT *
FROM all_tables t
WHERE t.owner ='DM' AND table_name like 'RESP_TEST_%';
BEGIN
LOOP
INSERT INTO DM.all_broadcast_responses SELECT * FROM TABLE DM.RESP_TEST_01;
END LOOP;
EXCEPTION
WHEN OTHERS THEN ROLLBACK;
END DM_DATA;
----
And i'm getting: Error(9,6): PL/SQL: SQL Statement ignored
Error(9,70): PL/SQL: ORA-00906: left parentesis missing
What's wrong? I'm in the right way?