update t_bei_bankpayingbill set fpayunique = case  when fbillstatus = 'F' then fid when fbillstatus = 'T' then fid else -1 end where fpayunique is null or fpayunique = 0;
update t_bei_bankagentpaybill set fpayunique = case  when fbillstatus = 'F' then fid when fbillstatus = 'T' then fid else -1 end where fpayunique is null or fpayunique = 0;
update t_bei_banktransupbill set fpayunique = case  when fbillstatus = 'F' then fid when fbillstatus = 'T' then fid else -1 end where fpayunique is null or fpayunique = 0;
update t_bei_banktransdownbill set fpayunique = case  when fbillstatus = 'F' then fid when fbillstatus = 'T' then fid else -1 end where fpayunique is null or fpayunique = 0;
