Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Functions using DBMS_SQL

Functions using DBMS_SQL

From: <clint.scott_at_bosquenetwerks.com>
Date: Tue, 02 Jun 1998 21:36:32 GMT
Message-ID: <6l1r90$r4i$1@nnrp1.dejanews.com>


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;

  BEGIN     l_counter := 0;
    l_theCursor := dbms_sql.open_cursor;

    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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US