Path: utzoo!attcan!uunet!cpqhou!thomasr From: thomasr@cpqhou.UUCP (Thomas Rush) Newsgroups: comp.databases Subject: Re: SQL problem, mark II Summary: Answers Message-ID: <619@cpqhou.UUCP> Date: 13 Apr 90 05:00:00 GMT References: Lines: 31 1) put the key values returned into an array, then FOR i = 1 TO array_size DO DELETE FROM table WHERE table.keycolumn = array[i] 2)break the big cursor up into smaller peices: SELECT ... WHERE keycolumn BETWEEN 0 and 100 FOREACH cursor DELETE FROM table WHERE keycolumn = cursor.value SELECT ... WHERE keycolumn BETWEEN 101 and 200 FOREACH cursor DELETE FROM table WHERE keycolumn = cursor.value Repeat as necessary. Can be put into a for loop for i - 1 to n do select ... where keycol between (i-1)*100 and i*100 foreace etc. 3) Informix's OnLine engine provides for "persistant cursors." Declare the driving cursor as persistant, and it doesn't get closed until you explicitly close it. Working with transactions does certainly take more work in situations like this. thomas rush uunet!cpqhou!thomasr compaq computer corporation their employee, deep in the hearth of texas not their opinions.