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 -> Re: passing variable to a cursor

Re: passing variable to a cursor

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 8 Sep 2005 08:09:55 -0700
Message-ID: <1126192195.148939.148410@f14g2000cwb.googlegroups.com>


Charlin, what you are trying to do is actually modify the SQL statement at run time but you are doing it using a static SQL statement.

Look up the execute immediate statement and the topic of dynamic SQL.

Potentially the routine you are placing this code in could run as the current user. If the code should be looking for tables owned the user running the code this may be an alternate to using dynamic SQL. See invoker rights clause of Create Procedure or Create Package.

If the code is anonymous pl/sql then the use of user owned synonyms might be a means to provide the necessary ownership information.

HTH -- Mark D Powell -- Received on Thu Sep 08 2005 - 10:09:55 CDT

Original text of this message

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