It's not a secret anymore!*
The moose likes Oracle/OAS and the fly likes Pass cursor iteration as parameter to PL/SQL procedure or function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Pass cursor iteration as parameter to PL/SQL procedure or function" Watch "Pass cursor iteration as parameter to PL/SQL procedure or function" New topic
Author

Pass cursor iteration as parameter to PL/SQL procedure or function

Oscar Calderon
Ranch Hand

Joined: Nov 27, 2009
Posts: 32
Hi to all, i have the next situation:

I have a package with 2 procedures, procA and procB. Inside procA i call several times to procB. Inside procA i iterate over a cursor defined in the package, not in the procedure. The cursor is a query from various tables. I need to pass to procB the entire "row" of my cursor when i'm iterating because cursor query columns are a lot and i don't want to declare all those colums as parameters in procB. I've tried using REF CURSOR and RECORD but probably i do something wrong because it doesn't work.

Here's the code of my package:



What's wrong in my ref cursor?

Regards.


Wanna grow? Learn, live, love people and enjoy life
Gene Hilpert
Ranch Hand

Joined: May 22, 2002
Posts: 51

On line 14 I think it should be = vPago.c2 not =rVarPago.c2 because rVarPago is a type
 
jQuery in Action, 2nd edition
 
subject: Pass cursor iteration as parameter to PL/SQL procedure or function
 
Similar Threads
Execute Multiple SQL Queries in PL/SQL Procedure based on parameter
pl sql related problem
Returning Cursor from Stored Procedure
Error :java.sql.SQLException: Invalid column index
registerOutParameter Problem when the type is ARRAY