Re: Parameterized cursors in PL/SQL
From: Jonathan Wayne Ingram <jwingram_at_whale.st.usm.edu>
Date: 1995/11/15
Message-ID: <48dfms$79t_at_thorn.cc.usm.edu>#1/1
Date: 1995/11/15
Message-ID: <48dfms$79t_at_thorn.cc.usm.edu>#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 Received on Wed Nov 15 1995 - 00:00:00 CET