Hi All,
DECLARE
v_deptnos sys.odcinumberlist;
BEGIN
v_deptnos := (10,20,30);
EXECUTE IMMEDIATE 'CREATE TABLE TEST_EMP
AS SELECT * FROM EMP
WHERE DEPTNO IN(SELECT column_value
FROM TABLE ('||v_deptnos||'))';
END;
Error starting at line : 1 in command -
DECLARE
v_deptnos sys.odcinumberlist;
BEGIN
v_deptnos := (10,20,30);
EXECUTE IMMEDIATE 'CREATE TABLE TEST_EMP
AS SELECT * FROM EMP
WHERE DEPTNO IN(SELECT column_value
FROM TABLE ('||v_deptnos||'))';
END;
Getting below error while executing the above script.
Error report -
ORA-06550: line 4, column 18:
PLS-00382: expression is of wrong type
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored
ORA-06550: line 5, column 23:
PLS-00306: wrong number or types of arguments in call to '||'
ORA-06550: line 5, column 5:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
I am using Oracle 19c database.
How to solve it.
Thanks in advance.
Best Regards,
Abu