Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to bind array variable into EXECUTE IMMEDIATE

524450Sep 28 2008 — edited Sep 29 2008
Hi..

Currently, I had tried to bind object into EXECUTE IMMEDIATE command but it's not working.
Hereby, the code which I wrote:

declare
v_sql varchar2(1000);
type list_var is table of number;
arr_var list_var;
begin
arr_var(1) := 12;
arr_var(2) := 13;
arr_var(3) := 14;

v_sql := 'insert into tbl_x(a,b,c) values(:a,:b,;c)';
execute immediate v_sql using arr_var;
end;

So, I would ask anyone who can give me the solution for this problem?
Many thanks for the reply.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2008
Added on Sep 28 2008
4 comments
2,184 views