Can I use dynamic SQL in PL/SQL function?

From: Thomas F. Zadlo <thomas_at_netreach.net>
Date: 1997/06/30
Message-ID: <5p878s$346$1_at_tahiti.netreach.net>#1/1


I am trying to create a PL/SQL function that creates a bibliography entry from information in several tables. Obviously the format of the bibliography changes depending on the type of work (book, magazine article etc.) I wanted this to be table driven so the user can modify it.

So I created a nice PL/SQL function accepting the citation number so that it would be easy to use. I get the component and sequence info from the formatting table, and then use calls from DBMS_SQL to create dynamic SQL to put them together.

And I get a message back when I try it saying that Oracle cannot guarantee it won't update the database. When I try to use a RESTRICT_REFRENCES pragma, it gives me grief. Now, I realize that the dynamic SQL library could be making updates to the database (as far as Oracle knows) but I know it's only doing SELECT statements.

So my question is: how can I make this work?

Thanks much
Thomas Zadlo
ECRI
thomas_at_netreach.net Received on Mon Jun 30 1997 - 00:00:00 CEST

Original text of this message