Print Thread
Explain plan window, variables are sometimes not replaced by bind variables
#63808 04/12/22 01:36 PM
Joined: Dec 2005
Posts: 2,004
Roima Denmark
Member
OP Offline
Member
Joined: Dec 2005
Posts: 2,004
Roima Denmark
This is a repost from the beta 15 forum.

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 #63813 04/12/22 02:20 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
Remaining 15.0 Beta issues will be resolved in a future patch release.


Marco Kalter
Allround Automations

Moderated by  support 

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.086s Queries: 14 (0.017s) Memory: 2.5019 MB (Peak: 3.0436 MB) Data Comp: Off Server Time: 2024-05-17 04:04:49 UTC
Valid HTML 5 and Valid CSS