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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL within PL/SQL Block

Re: Dynamic SQL within PL/SQL Block

From: James Lorenzen <lorenzen_at_tiny.net>
Date: Mon, 20 Apr 1998 18:08:03 GMT
Message-ID: <lorenzen-ya02408000R2004981308000001@news.visi.com>


The pacakage is DBMS_SQL. It requires that you:

  1. Open a cursor ( DBMS_SQL.OPEN_CUSOR)
  2. Parse the statement ( DBMS_SQL.PARSE)
  3. Execute the statement ( DBMS_SQL.EXECUTE)
  4. Close the cursor ( DBMS_SQL.CLOSE_CUSOR)

The DBMS_SQL package will work with bind variable and it is a very powerfull tool. I use it alot to dynamically update tables from remote databases.

HTH
   James

In article <6hf5og$5g9$1_at_schbbs.mot.com>, "Alan D. Mills" <alanmNOSPAM_at_uk.europe.mcd.mot.com> wrote:

>Is there any mechanism for executing dynamic SQL within PL/SQL in Oracle
>7.3.
>
>Basically we want to perform an update statement with the update statement
>built dynamically into a large(ish) VARCHAR2 variable. We need some
>mechanism for executing the thing.
>
>I seem to remember that there is a package that might help with this. If so
>could anyone remind me what it is.
>
>Replies by email if possible
>
>--
>Alan D. Mills
>
>To email remove NOSPAM from address.

--

lorenzen_at_tiny.net             | Life is complex; it has
                              |   real and imaginary parts
Received on Mon Apr 20 1998 - 13:08:03 CDT

Original text of this message

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