I write a procedure which will generate the insert statments
for a table (the table name passed as parameter),
in this procedure I use a reference cursor but I have error because I don't know the name of the table before the run time
for a table (the table name passed as parameter),
in this procedure I use a reference cursor but I have error because I don't know the name of the table before the run time
Code:
CREATE OR REPLACE PROCEDURE GENERATE_INSERT_STAT(V_TABLE_NAME VARCHAR2) AS
DECLARE
V_INSERT VARCHAR2(1000);
BEGIN
FOR TAB_CUR IN ( SELECT *
FROM [I]V_TABLE_NAME[/I]
WHERE (...any condition....)
)
....
...
END;
Comment