I would not even use a cursor for an update. I would do it like this:
update burials set ownerid = t2.ownerid from burials t1, plotowners t2 where + t1.seqno = t2.seqno Take a look at the help under update. It has an example at the bottom. Dan Goldberg -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of William Owens Sent: Monday, July 26, 2004 9:42 AM To: RBG7-L Mailing List Subject: [RBG7-L] - DECLARE CURSOR If anyone can help please. I've never used declare curor I've always used set pointer.. I'm trying to read plotowners table and get ownerid and seqno from table then update burial table with ownerid where seqno in plotowner table = seqno in burial table code below is not working... SET MESSAGES Off SET ERROR MESSAGES ON SET RULES OFF SET VAR Vowner INTEGER set var vseq integer declare cursor1 cursor for select ownerid, seqno from plotowners order by seqno open cursor1 fetch cursor1 into vowner indicator vi1, vseqno indicator vi2 while sqlcode <> 100 then update burials set ownerid = .vowner where seqno = .vseq and where current of cursor1 fetch cursor1 into vowner indicator vi1, vseqno indicator vi2 endwhile drop cursor1 quit Thanks Bill
