Hello Bill: Try this
Update burials set ownerid=t2.ownerid from burials t1, plotowners t2 + Where t1.seqno=t2.seqno -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 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
