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: PL/SQL Question

Re: PL/SQL Question

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Tue, 5 Oct 1999 14:28:40 +0200
Message-ID: <7tcqv9$lup$1@oceanite.cybercable.fr>


You have to use the dbms_sql package.
Something like this:

create procedure ...
is
...
cid integer;
result integer;
...
begin
...
 cid := dbms_sql.open_cursor;
 dbms_sql.parse (cid,

                 'insert into my_table (... '||NAT||') values ...',
                 dbms_sql.native);

 result := dbms_sql.execute (cid);
 dbms_sql.close_cursor (cid);
...
end;
/

--
Regards

Michel

Titi <thierryb_at_gulliver.fr> a écrit dans le message : 37F9EA11.EA6DBB0B_at_gulliver.fr...
> Hi,
> may be it's not the good forum to post this question...
>
> I work with an Oracle 7.3 database.
>
> I have a stored procedure
>
>
> create procedure my_insert (...,..., NAT varchar2) is
> ....
> begin
> ...
> insert into my_table (.....,...., NAT ) values (...,...,....);
> ...
> end;
>
> In fact, in my insert commande I would like the content of my variable
> NAT
>
> example :
> execute my_insert(...,...,'the_name_of_my_field');
>
> Is it possible to do that???
>
> Thanx for your help
> All my love :o)
>
> Thierry
>
Received on Tue Oct 05 1999 - 07:28:40 CDT

Original text of this message

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