Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Array generation
Hi everybody
I would like to copy "somewhere" an image of record i want to update later.
I use this only for 3 or 4 records each time (but very often).
-1- So i would like to create a VARRAY of record to store the selected
record,
-2- Do my update.
-3- Then i need an answer from an external procedure (it takes 5 secondes)
-4- If it's a bad answer, i would like to copy the update back the records.
I can use a classic rollback, but i don't want to lock the table for such a long time (5 secondes).
I try to create my ARRAY, but i have a invalide error.
Can anyone could give me a direct to fix it ?
Thanks
My script
CREATE OR REPLACE
PROCEDURE my_proc PROCEDURE (modify_by IN VARCHAR2 DEFAULT NULL) IS
TYPE t_emp IS VARRAY(10) OF my_database.emp%ROWTYPE;
v_emp t_emp := NULL;
BEGIN
SELECT * INTO v_emp FROM my_database.emp
When i generate it ia have this error, but i check and i can see my EMP table.
LINE/COL ERROR
-------- -----------------------------------------------------------------
5/3 PLS-00493: invalid reference to a server-side object in a local
context
5/3 PL/SQL: SQL Statement ignored
--
Pierre Oub
Remove "123" to answer me Received on Wed Feb 02 2000 - 16:03:40 CST