Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!bg0l+ From: bg0l+@andrew.cmu.edu (Bruce E. Golightly) Newsgroups: comp.databases Subject: SQL problem, mark II Message-ID: Date: 12 Apr 90 18:48:17 GMT References: Organization: Carnegie Mellon, Pittsburgh, PA Lines: 43 Once more into the breech, dear friends. I got this from one of our developers today. Anybody got any bright ideas on this one? The context is, I think, self-explanatory from the memo I'm including here, but I'll sketch it out for practice. The application has open a cursor. The set returned by the cursor used to define the cursor is quite large. We wish to use the rows of that set to define the criteria for performing delete operations on rows in the data base. The WHERE qualification on the DELETE is moderately elaborate. ***************FORWARDED MESSAGE BEGINS HERE*************************** Just a note to complete the discussion on updates or deletes within a big cursor loop (ie. transaction). There is no way out ! The "set autocommit" that i saw is only another way to write "commit" after each sql statements, exactly what i wanted to avoid since it closes my big cursor ! So, finally, i have to unload the table i want to scan through with the big cursor into a file (!) so that i can read this file line by line with normal c statements and do the updates i want to other tables !!... It seems very ironical to have all these data into nice tables and have to use files to read them ? i really wonder why they are doing this ?!... **************** END FORWARDED MESSAGE ************************** ############################################################################### ! Bruce E. Golightly ! bg0l@andrew.cmu.edu (BeeGeeZeroEl) Chief of Data Base Development ! (412)268-8560 Telecommunications Group ! Carnegie Mellon University ! UCC 117, 4910 Forbes Ave. ! Pittsburgh PA 15213-3890 Vice President, Western Penna IUA ! ###############################################################################