Re:
Posted in 2000
Something like: update bizguaranteereq set (...) = ((select ...)) where exists (select 0 from incentval a1 where bizguaranteereq.userid = a1.userid and bizguaranteereq.servissue = a1.offercode) ? >>> "Astemborski, Jon" <JAstemborski@biztravel.com> 10/02/00 02:26pm >>> Hello everyone, I am trying to update a table based on the contents of another table but only where the primary keys are equal. Because I can not directly reference the non updated table in a from statement it throws off what I want to do. I tried to replicate it with a sub queries but I received error 284 (a query has not returned not exactly one row). I understand the error, but how can I perform a multirow update based on the contents of another table? (I have tried numerous other variations but to no avail) update bizguaranteereq set (occurdate,itineraryid,statuscd,moddate) = ((select a1.creationdate,a1.itineraryid, 99 statuscd, today moddate from incentval a1, biztemp a2 where a1.userid=a2.userid and a1.offercode=a2.servissue and statuscd!=99)) where userid=(select userid from incentval) and servissue=(select offercode from incentval Regards, Jon Astemborski