Explain plan window, variables are sometimes not replaced by bind variables

Claus Pedersen

Member³
This is a repost from the beta 15 forum.

I have the following code on schema HR:

SQL:
DELETE employees
WHERE employees.last_name = LastName
RETURNING employees.employee_id BULK COLLECT INTO ListEmployeeId;

where LastName and ListEmployeeId are local variables.

When I mark the code and press F5 to get an explain plan, I get the error: ORA-00904: "LASTNAME": invalid identifier

I then manually must make the first variable into a bind variable (by prefixing it with colon, like :LastName) and then I can press F8 to get the explain plan.

If I mark only the first two lines of the statement (excluding the RETURNING line) and press F5, the explain plan works as it should: it automatically replaces my variable with a bind variable that Oracle understands. It seems like PLD gets confused over the returning clause.

Can this be fixed?
 
Back
Top