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: Worst of the worst

Re: Worst of the worst

From: Adrian Billington <billiauk_at_yahoo.co.uk>
Date: 30 May 2003 06:20:22 -0700
Message-ID: <dee17a9f.0305300520.9b79682@posting.google.com>


Here's another from the "Collections and Records" guide in the 817 docs:-

CREATE TABLE coords (x NUMBER, y NUMBER); CREATE TYPE Pair AS OBJECT (m NUMBER, n NUMBER);
/

DECLARE
   TYPE PairTab IS TABLE OF Pair;
   pairs PairTab := PairTab(Pair(1,2), Pair(3,4), Pair(5,6));    TYPE NumTab IS TABLE OF NUMBER;
   nums NumTab := NumTab(1, 2, 3);
BEGIN
   /* The following statement succeeds. */    FORALL i in 1..3

      UPDATE coords SET (x, y) = (pairs(i).m, pairs(i).n)
         WHERE x = nums(i);

END;
/

I love the comment "The following statement succeeds" when it is clearly syntactically incorrect and fails miserably. Using collections of records in FORALL is still not supported in 9.2 and I submitted an enhancement request for this a long time ago... Quite what the author of the above was smoking I don't know.

Adrian Received on Fri May 30 2003 - 08:20:22 CDT

Original text of this message

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