How to pass a sequence by 'using' for execute immediate
DIVIJan 8 2013 — edited Jan 9 2013how i can pass a sequence.nxlval as a parameter through using , here is my code looks like
sql_string is -> insert into some_tab (col1,col2, ....) (select col1,:passed_seq,......) where .... (i want to insert sequence values for col2)
and i am calling this as
passed_seq := 'seq_'||some_dynamic_num||'.nextval' ( in my db there will be sequences with the formed string like seq_10.nextval)
EXECUTE IMMEDIATE sql_string using passes_seq;
if i am doing like this i am getting
Error : -1722:ORA-01722: invalid number seq_10.nextval
Edited by: DIVI on Jan 8, 2013 7:40 AM