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: How can I execute an SQL statement from a PL/SQL string ?

Re: How can I execute an SQL statement from a PL/SQL string ?

From: Bernhard Riehm <briehm_at_perbit.de>
Date: Thu, 5 Aug 1999 12:07:33 +0200
Message-ID: <7obngq$cbs$1@black.news.nacamar.net>

You need to use Dynamic SQL
You must use the DB_MS-Package and do the following steps:

- DB_MS.OPEN_CURSOR
- DB_MS.PARSE
- DB_MS.BINDVARIABLE, if you want to use varaible in the SQL-Statement
- DB_MS.EXECUTE
- DB_MS.CLOSE_CURSOR

Good Luck
Bernhard Riehm
perbit Software GmbH

Vincent BARAT <vincent.barat_at_alcatel.fr> wrote in message news:37A94F3D.DB888055_at_alcatel.fr...
> Hi !
>
> In a PL/SQL program, I have an SQL statement contained in a string
> variable
> and I want to execute it and get the result in a cursor (or anything
> else).
>
> I can't figure out how to do that... Can you help me please ?
>
> Thanks a lot !
>
> --
> Vincent BARAT
>
> ======================================================================
> Web site: http://www.multimania.com/vbt/
> Email (work): Vincent.Barat_at_alcatel.fr
> Email (home): vbarat_at_iway.fr
>
> "Contrary to popular belief, Unix is user friendly.
> It just happens to be selective about who it makes friends with."
> ======================================================================
Received on Thu Aug 05 1999 - 05:07:33 CDT

Original text of this message

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