Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Execute stored proc with bind variables using SQL+

CitySwanSep 25 2018 — edited Sep 25 2018

Hi All,

I have a stored procedure that will be executed against various departments which passes in a parameter (dept_id).  It is straight forward to run it through sqlDeveloper because the bind causes a dialog box to appear for assigning a value to the parameter.

e.g.

In sqlDeveloper I can just run:

execute update_department_rows(p_department => :dept);

when running the above in sql + , I am getting the Bind variable "DEPT" not declared.

As this will be run outside of sqlDeveloper on a department by department basis, I don't really want to be changing the sql file to "execute update_department_rows(p_department => 1);" and so on for each department.

Thanks in advance

Chris

This post has been answered by cormaco on Sep 25 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2018
Added on Sep 25 2018
7 comments
986 views