Delete inside a cursor loop [message #94056] |
Thu, 27 November 2003 07:40 |
Ultra
Messages: 98 Registered: November 2003
|
Member |
|
|
Hello,
I want to delete the rowid retrieved from
my cursor, without using an array.
Is it possible to run an sql inside a cursor ?
It works but is it reliable ?
Thank U
while (1)
{
fetch rowid
delete rowid
}
|
|
|
Re: Delete inside a cursor loop [message #94082 is a reply to message #94056] |
Fri, 09 January 2004 04:12 |
GIRIDHAR KODAKALLA
Messages: 92 Registered: May 2001
|
Member |
|
|
I dont think it works perfectly every time. You may get Snapshot too old error (ORA 1555).
Generally under this conditions we create a temporary table with the rowids you want to delete,declare a cursor on this table and delete data from the main table.
Regards,
Giridhar Kodakalla
|
|
|