Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-21700: object does not exist or is marked for delete

779550Jul 13 2011 — edited Jul 28 2011
Hi,

I have a table type my_tt which is table of a record type.

my_tt is table of my_record;

I have a variable my_var of type my_tt

my_var my_tt;
my_var1 my_rt;

I have my_var populated and am iterating through the same using while loop

my_index = my_var.FIRST;

WHILE my_index <= my_var.COUNT
LOOP


SELECT c.field1, sum(c.field2) into my_var1 from TABLE(my_var) c WHERE c.field1 = 10 GROUP BY field1

END LOOP;

When this code is executed I am getting the error 'ORA-21700: object does not exist or is marked for delete'.

If i change the query to SELECT my_var(my_inex).field1,my_var(my_inex).field2 into my_var1 from DUAL c WHERE c.field1 = 10

the whole execution is completed correctly.

Is there something like i cant query a table type variable while I am looping through the same. Is there any work around for this?

Thanks
Paddy
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2011
Added on Jul 13 2011
2 comments
402 views