Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Worst of the worst
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);
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