Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maybe i'm making this too hard
Message
Information générale
Forum:
Oracle
Catégorie:
PL/SQL
Divers
Thread ID:
00464608
Message ID:
00465248
Vues:
14
unfortunately, stuck in 8.0.5. i did see that it could be done with 8i, but we're not upgrading anytime soon.

found a couple of workarounds -- don't care for them, but they'll do for now. thanks for your help.


>If you have 8i there is a new cursor syntax called OPEN FOR.
>It allows you to make dynamic SQL in a cursor.
>
>You could code it like:
>
>TYPE generic_rc IS REF CURSOR; (or CURSOR)
>cv generic_rc;
>BEGIN
>OPEN cv FOR
>'SELECT ' || column_list ||
>' FROM ' || table_list ||
>' WHERE '|| where_clause;
>
>So you could pass in your table name, columns, where to a procedure
>
>This sounds like what you are looking for.
>
>I don't think this was possible on older releases. i.e. problem was you cannout use DBMS_SQL to create a cursor (but there are probably other things you can do depending on what you want the cursor for...) which is why this feature has been added.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform