DECLARE
type seqarr is varray(10) of varchar2(50);
seq seqarr;
begin
seq := seqarr('SEQ_A','SEQ_B','SEQ_C','SEQ_D');
FOR i IN seq.FIRST .. seq.LAST
loop
execute immediate 'alter sequence'||seq(i)||'increment by 900000000';
select seq(i).nextval from dual;
execute immediate 'alter sequence'|| seq(i) ||'increment by 1 nocache';
END LOOP;
END;
For the above code I am getting error for the 2nd statement inside loop.
ORA-06550: line 11, column 14:
PLS-00487: Invalid reference to variable 'VARCHAR2'
ORA-06550: line 11, column 14:
PL/SQL: ORA-22806: not an object or REF
ORA-06550: line 11, column 7:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: