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: FORALL in 8i

Re: FORALL in 8i

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 10 Feb 2000 10:32:14 -0500
Message-ID: <4tl5ask02g1iims0h0e5i283bgt3054dc8@4ax.com>


A copy of this was sent to "Stephen Darlington" <stephen_at_zx81.org.uk.nospam> (if that email address didn't require changing) On Thu, 10 Feb 2000 13:44:57 -0000, you wrote:

>I was quite impressed when I first learned about bulk binds in 8i's
>implementation of PL/SQL (on NT if that's important). I was less impressed
>when I found that this wouldn't work:
>
>CREATE OR REPLACE PROCEDURE Test_Bulk AS
> TYPE a IS RECORD (a NUMBER, b NUMBER);
> TYPE b IS TABLE OF a;
> q b;
>BEGIN
> FORALL x IN 1..100
> INSERT INTO D1 VALUES (q(x).a, q(x).b);
>END Test_Bulk;
>/
>
>It tells me "PLS-00707: unsupported construct or internal error [2603]". Can
>anyone tell me which it is? I suspect it's an internal error since it works
>fine with a normal FOR loop but a second opinion is always good!
>

it won't work because the forall works with tables of scalars -- not with tables of complex types. It is sending a contigous array over to the server. q().a and q().b are not contigous arrays.

It is an unsupported construct.

>Cheers,
>--> Stephen
>---------------------------------------------------------------
> Stephen Darlington (http://www.zx81.org.uk)
> "Never put a sock in a toaster"
>---------------------------------------------------------------
>

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Feb 10 2000 - 09:32:14 CST

Original text of this message

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