Dynamic Using Clause (merged 3) [message #388390] |
Tue, 24 February 2009 09:47  |
bpeasey
Messages: 46 Registered: March 2005
|
Member |
|
|
Hi,
We have dynamic SQL using the USING clause. A recent change requires us to now make the USING clause dynamic eg. different list of bind variables depending on how the WHERE clause is constructed.
Treating the USING clause as a string and concatenating it to the rest of the SQL statement is not working.
This is a snippet of the original code:
WHERE ' || v_WhereClause
USING p_customer_id,p_order_id;
I tried this:
v_USING := ' p_parameter_one,p_parameter_two';
WHERE ' || v_WhereClause || v_USING;
ORA-00933: SQL Command not properly ended
Any ideas? Thx
BP
|
|
|
|
|
|