Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Functions using DBMS_SQL
I need some help.
I have a function within a package that uses dbms_sql. I set PRAGMA
RESTRICT_REFERENCES (find_ids, WNDS) in the package declaration like so:
create or replace package doit AS
function find_ids(where_clause in varchar2) return varchar2;
PRAGMA RESTRICT_REFERENCES (find_ids, WNDS);
end doit;
When I compile the package body, I get an error stating that I've violated my pragma. How can I use DBMS_SQL inside a function to return data? Please help.
The package body is:
function find_ids( where_clause in varchar2) return varchar2 is
begin
......
l_theCursor integer; s_idList varchar2(30000); l_status integer; l_counter integer;
dbms_sql.parse( l_theCursor,
'SELECT to_char(subscriber_id) s_load_id FROM subscribers WHERE '||where_clause, dbms_sql.native );
TIA, Please reply via email as I don't get to read this group very often: clint.scott_at_bosquenetwerks.com
blah, blah, blah about fetching the rows.
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Tue Jun 02 1998 - 16:36:32 CDT