970779 wrote:This is where DBMS_SQL comes in. You can bind a varying number of variables with it.
but alas I can't have a dynamic USING clause, to handle the varying number of variables.
970779 wrote:I was afraid it would work (ran into the same problems a decade ago)... ;)
Thanks Hoek I tested your suggestion and it works a charm!
What a simple solution, but how can I put an ALTER SESSION in a package run by a concurrent request?You can use ALTER SESSION in an EXECUTE IMMEDIATE statement as well, if you need to do it from PL/SQL.
SQL> begin 2 execute immediate 'alter session set cursor_sharing=''FORCE'''; 3 end; 4 / PL/SQL procedure successfully completed.
I was wading through Odie's dbms_sql.bind_variable and dbms_sql.parse solution but I don't find it clear and I'm not sure what those procedures doNot clear?