I have obtained the following as an example of womething more complex I am trying to do:
When I run it it errors with ORA-06550:expression 'L_DATA' in the INTO list is of wrong type.
Is it the version of Oracle I am using (8.1.7.4) that is causing this error or is there something wrong with the code.
TIA
[blue]DBomrrsm[/blue]
[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
Code:
declare TYPE ARRAY IS TABLE OF all_objects%ROWTYPE;
l_data ARRAY;
CURSOR c IS
SELECT *
FROM all_objects;
BEGIN
OPEN c;
LOOP
FETCH c BULK COLLECT INTO l_data LIMIT 100;
FORALL i IN 1..l_data.COUNT
INSERT INTO t2 VALUES l_data(i);
EXIT WHEN c%NOTFOUND;
END LOOP;
CLOSE c;
END;
When I run it it errors with ORA-06550:expression 'L_DATA' in the INTO list is of wrong type.
Is it the version of Oracle I am using (8.1.7.4) that is causing this error or is there something wrong with the code.
TIA
[blue]DBomrrsm[/blue]
[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]