Path: utzoo!utgpu!water!watmath!clyde!rutgers!mcnc!decvax!decwrl!sun!imagen!atari!portal!cup.portal.com!truett From: truett@cup.portal.com Newsgroups: comp.databases Subject: Re: Informix query Message-ID: <2414@cup.portal.com> Date: 12 Jan 88 08:57:02 GMT References: <3890001@hpcmmb.HP.COM> <3216@ihlpf.ATT.COM> <2318@cup.portal.com> <67@coot.AUSTIN.LOCKHEED.COM> <29074UH2@PSUVM> Organization: The Portal System (TM) Lines: 13 XPortal-User-Id: 1.1001.2190 It turns out that in order to solve the problem, a single cursor is needed. The cursor is defined for a SELECT . . . FOR UPDATE OF . . . and then the UPDATE . . . is performed using the qualifier CURRENT OF "cursorname". The looping action within which the FETCH is performed sems to differ according to the particular implementation of SQL involved. Of course, it may be that using the FOR UPDATE OF and CURRENT OF constructs with a cursor ties the two operations together so that everything works without an explicit looping type of syntax. That would seem to be more in the spirit of "nonprocedural" languages. (I will defer the diatribe about how sleazy the term "non- procedural" is. :-)) Truett Lee Smith, Sunnyvale, CA UUCP: truett@cup.portal.com