Home > other >  Ask about, the problem of the cursor
Ask about, the problem of the cursor

Time:04-16


I use the cursor to open the select * from aa where stata=0

Up to 10000 records, my cursor, each loop 100

The data

While (data)

XXXXXXXX
Do some business logic

With business logic is done, I want to delete this article 100 data in carrying out the next cycle
Cur. Exec (delete "aa where id in (100 id)")


But now I like to use, well done, I have been submitted to the cx_Oracle: Interface Error

Whether in one, not walk the cursor, I can't be deleted?

If this time, I again open a cursor, deletion, will not go in front of a cursor what effect?

For example,

First: a cursor I perform reads 10000 records, each cycle 100
Second: execute the business logic, open a new cursor, I delete the 100 records
Third: first cursor removed 100 data


  • Related