Print Thread
explain plan window, variables are sometimes not replaced by bind variables
#63506 03/01/22 12:27 PM
Joined: Dec 2005
Posts: 2,015
Roima Denmark
Member
OP Offline
Member
Joined: Dec 2005
Posts: 2,015
Roima Denmark
I have the following code on schema HR:
SQL Query
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?

Re: explain plan window, variables are sometimes not replaced by bind variables
Claus Pedersen #63510 03/01/22 06:00 PM
Joined: Aug 1999
Posts: 22,361
Member
Offline
Member
Joined: Aug 1999
Posts: 22,361
We'll try to enhance this.


Marco Kalter
Allround Automations

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.022s Queries: 14 (0.006s) Memory: 2.4984 MB (Peak: 3.0397 MB) Data Comp: Off Server Time: 2024-10-14 12:24:18 UTC
Valid HTML 5 and Valid CSS