Re: Parameterized cursors in PL/SQL

From: Roger Snowden <snowden_at_haven.ios.com>
Date: 1995/11/20
Message-ID: <48qn03$nd8_at_news.ios.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 :
: declare
: cursor c_1 (tname IN VARCHAR2) is
: select <col1>, <col2> ... <coln>
: from tname

You need to use the dbms_sql package to support dynamic sql from within pl/sql. Get the package installed and read the documentation. Especially read the fax-back document on the subject. It is correct, while the Oracle book is actually misleading. There was also a good article int the Oracle magazine a couple of issues ago.

Roger Snowden
snowden_at_haven.ios.com Received on Mon Nov 20 1995 - 00:00:00 CET

Original text of this message