Home » Developer & Programmer » Precompilers, OCI & OCCI » Delete inside a cursor loop
Delete inside a cursor loop [message #94056] Thu, 27 November 2003 07:40 Go to next message
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 Go to previous message
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
Previous Topic: Pro C likes DECLARE, OPEN cursor, but not FETCH?
Next Topic: Problem while DML / DDL operation when Multithreading being used.
Goto Forum:
  


Current Time: Thu Feb 29 22:37:15 CST 2024