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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Looping through Ref Cursor

cmit0227Aug 12 2005 — edited Aug 22 2005
Hello--

I'm trying to figure out how to do the following:
I need to open and loop through different cursors based on criteria I receive from an in parameter, but I'm trying to avoid using dynamic sql. Each cursor will return the same rowtype -- only their where clauses will be different.

Once I have determined which cursor I'm going to use I then need to open it and loop through it. I haven't worked with ref cursors or rowtypes before so I'm trying to figure out how to proceed. I know that I can't do a for loop when I'm using a ref cursor so I need to figure out how to open and loop through the ref cursor.

Any help would be greatly appreciated. Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2005
Added on Aug 12 2005
23 comments
25,552 views