UPDATE T_ER_CHECKINGPAYENTRY ACC SET FOPERATIONTYPE  = (SELECT '1'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('1','5') AND ACC.FOPERATIONTYPE = ' ') WHERE  EXISTS(SELECT '1'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('1','5')AND ACC.FOPERATIONTYPE = ' ');
UPDATE T_ER_CHECKINGPAYENTRY ACC SET FOPERATIONTYPE  = (SELECT '2'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('2','4') AND ACC.FOPERATIONTYPE = ' ') WHERE  EXISTS(SELECT '2'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('2','4')AND ACC.FOPERATIONTYPE = ' ');
UPDATE T_ER_CHECKINGPAYENTRY ACC SET FOPERATIONTYPE  = (SELECT '3'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('3') AND ACC.FOPERATIONTYPE = ' ') WHERE  EXISTS(SELECT '3'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('3')AND ACC.FOPERATIONTYPE = ' ');
UPDATE T_ER_CHECKINGPAYENTRY ACC SET FOPERATIONTYPE  = (SELECT '4'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('6') AND ACC.FOPERATIONTYPE = ' ') WHERE  EXISTS(SELECT '4'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('6')AND ACC.FOPERATIONTYPE = ' ');
UPDATE T_ER_CHECKINGPAYENTRY ACC SET FOPERATIONTYPE  = (SELECT '5'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('7') AND ACC.FOPERATIONTYPE = ' ') WHERE  EXISTS(SELECT '5'  FROM T_ER_CHECKINGPAY BILL WHERE  ACC.FID = BILL.FID AND BILL.FOPERATIONTYPE IN ('7')AND ACC.FOPERATIONTYPE = ' ');