Hi all,
I have a requirement to read from a cursor into a record and then manipulate data in that record with some values supplied from a user, before outputting results. So normally I would create a database table, populate from a cursor and then apply the deletes / updates to this temporary table, output results and drop this table.
However I am restricted in that for various reasons we cannot easily create even temporary usage database tables at this client. Please leave aside the absurdity of this situation for now.
Is there a way that one can read data into record objects in PL/SQL (or an equivalent structure), and then insert and delete into that object ? If not how else might this be achieved ?
Added via edit : we are PL/SQL Release 10.2.0.3.0
The code would be something comparable to :
DECLARE
v_emprec employees%ROWTYPE;
CURSOR cur
IS
SELECT * FROM employees ;
BEGIN
OPEN cur;
LOOP
FETCH cur INTO v_emprec;
EXIT WHEN cur%NOTFOUND OR cur%ROWCOUNT > 5;
END LOOP;
/* Apply manipulations to the object selected into */
*DELETE FROM v_emprec WHERE ...*
END
Many thanks in advance for any ideas.
--LT
Edited by: lewist22 on Jul 27, 2010 3:24 AM