UPDATE t_pur_bidbillentry A SET (FWINSUPPLIERID, FWINAMOUNT) = (SELECT B.FSupplierID, A.FAMOUNT FROM T_PUR_BIDBILL_A B INNER JOIN T_PUR_BIDBILL C ON B.FID = C.FID WHERE (B.FID = A.FID AND (((C.FBIDSTATUS IN ('E', 'F')) AND C.FQUOTEMODE = '1') AND A.FWINSUPPLIERID = 0))) WHERE EXISTS (SELECT 1 FROM T_PUR_BIDBILL_A WHERE FID = A.FID) AND EXISTS (SELECT B.FSupplierID, A.FAMOUNT FROM T_PUR_BIDBILL_A B INNER JOIN T_PUR_BIDBILL C ON B.FID = C.FID WHERE (B.FID = A.FID AND (((C.FBIDSTATUS IN ('E', 'F')) AND C.FQUOTEMODE = '1') AND A.FWINSUPPLIERID = 0)))