Dear experts,
unable to create table , insert on same table in procedure and drop the same table after processing,it is giving below error
CREATE TABLE TEMP_HIST
(
T_SNO NUMBER,
T_ACT_TERM NUMBER
);
INSERT INTO TEMP_HIST VALUES(1,234);
INSERT INTO TEMP_HIST VALUES(2,567);
commit;
DECLARE
P_VAL VARCHAR2(20);
begin
execute immediate 'Create Table Temp(SLNo number(10) ,ACT_TERM_ID varchar2(15))';
IF P_VAL='DESC' THEN
INSERT INTO TEMP (SLNo,ACT_TERM_ID)
SELECT T_SNO,T_ACT_TERM FROM TEMP_HIST
ORDER BY T_SNO;
END IF;
EXECUTE IMMEDIATE 'DROP TABLE Temp';
end;
/
unable to create table , insert on same table in procedure and drop the same table after processing,it is giving below error
error occured
ORA-06550: line 6, column 13:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 6, column 1:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: