hi Gurus..
execute immediate 'select something from sometable where param1=:a and param2=:b' using a,b;
sounds good, if i have to dynamically add using clause how to do this?
for example i've a procedure
proc (a in varchar2, b in varchar2)
begin
vquery = 'select * from sometable where ';
if (a is not null) then vquery = vquery || ' param1=:a';
if (b is not null) then vquery = vquery || ' param2=:b';
execute immediate vquery using ????
Thanks.