PL/SQL (MOSC)

MOSC Banner

REF Cursors: Dynamic SQL Query

edited Oct 13, 2010 2:08AM in PL/SQL (MOSC) 6 commentsAnswered
 Hi,

I am creating a concurrent program that calls a PL/SQL package and performs certain actions on Oracle workflow transactions.

I would like to make this a generic program that can be used for performing a vast variety of actions on transactions. Each time the selction criteria of the transaction might be different.

What I need is to be have a 'dynamic cursor'. Meaning, I should be able to change the SELECT statement for the cursor each time I run, but without modifying the database package.

I have never used REF cursors before but it seems to be what I need to be looking at. In all the examples that I have seen in User Guides etc., the SQL statements are hard-coded.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center