Johnny_D
Johnny_D

Reputation: 4652

Execute oracle stored procedure with out cursor from PL/SQL developer

I'm having some troubles executing oracle stored procedure from package. I've intalled PL/SQL developer on local machine, and when I try to test procedure I get generated code like this:

begin
  -- Call the procedure
  owner.mypackage.getallrequests(res => :res,
                                                        id=> :id);
end;

But I can't modify this query to return me data. Would really appreciate help.

Upvotes: 1

Views: 6443

Answers (1)

Alex Poole
Alex Poole

Reputation: 191265

Assuming you've got to this point by right-clicking on the procedure in the object explorer and choosing 'test', you'll have a Test Window with the anonymous PL/SQL block you showed. You haven't said, but I assume id is an in variable, and res is the out cursor variable. In the variable section in the bottom half of the window, type in the ID value you're searching for, then execute it (clicking the gear, or hitting F8).

Nothing obvious will change if those are the only variables; non-cursor out or in out variables would be highlighted in yellow if their values had changed, but the cursor is not, and in variables by definition won't have changed.

At the far right of the res cursor variable in the bottom of the test window, there's a small button with ... in it, which the help pages refer to as the 'cell button'. Click that, and a new window will open showing the cursor result set.

Upvotes: 3

Related Questions