Re: Parameterized cursors in PL/SQL

From: Premchand Koganti <koganti_at_tek.com>
Date: 1995/11/20
Message-ID: <koganti.16.0030FA22_at_tek.com>#1/1


>Rene Hoekstra (Rene.Hoekstra_at_rivm.nl) wrote:
>: Can I pass a table name as a parameter to a cursor in
>: PL/SQL as in :
>Not the way you are attempting to do it.
 

>: declare
>: cursor c_1 (tname IN VARCHAR2) is
>: select <col1>, <col2> ... <coln>
>: from tname
>: where <where_clause>;
>: ...
>: begin
>: ...
>: open c_1 (<tablename>)
>: ...
>: end;
 

>Try using the DBMS_SQL package to do what you need to do (assuming
>that you are at version 7.1.3 or greater).
 

>Jonathan

You can also get the same results using record Groups, but i guess dbms_sql might be a better and faster approach.

Prem Received on Mon Nov 20 1995 - 00:00:00 CET

Original text of this message