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 and Batch Script

Re: PL/SQL and Batch Script

From: Mark Malakanov <markmal_at_delete-this-antispammer.home.com>
Date: Wed, 11 Jul 2001 04:41:11 GMT
Message-ID: <HNQ27.149865$Mf5.40571154@news3.rdc1.on.home.com>

May be dynamic PL/SQL block will help?

queries varchar2 := 'BEGIN insert into table1 values(1); insert into tablex  values('x)'; END;'
EXECUTE IMMEDIATE queries;

--
-----------------------------------------------------
Thanks,
Mark


"atta ur-rehman" <atta707_at_hotmail.com> ???????/???????? ? ????????
?????????: news:6e453d75.0107101939.29950ca0_at_posting.google.com...

> Dear all,
>
> in SQL*Plus we are able to copy-paste a script like:
>
> insert into table1 values(1)
> /
> insert into table1 values(2)
> /
> .
> .
> .
> /
>
> and all the statements are process in turn until list is exhuasted.
>
> my question is: is it possible to do the same, or is there an
> equvilant way to do it, in PL/SQL? Basically I want to send a varchar2
> parameter, consisting of an arbitrary number and types of SQL DMLs,
> and want to be able to submit it to the Oracle for processing them
> all. e.g:
>
> queries varchar2 := 'insert into table1 values(1); insert into tablex
> values('x)';
> EXECUTE IMMEDIATE queries;
>
> currently that doesn't work, of course. is there a way to achieve this
> behavior in a PL/SQL block. We're on Oracle 8.1.6, Windows NT.
>
> Thanks in advance for help.
>
> regards,
>
> :) ATTA
Received on Tue Jul 10 2001 - 23:41:11 CDT

Original text of this message

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