update
datum_return
set
developerLoanVoucherReturnDate='2020-4-9'
where
datum_return.customer_id = any(
select * from
(select
c.id
from customer c
inner join bank_project bp on c.bank_project_id=bp.id
inner join bank b on bp.bank_id=b.id
inner join project p on bp.project_id=p.id
inner join loan_information li on c.id=li.customer_id
inner join purchase_contract_information pci on c.id=pci.customer_id
inner join datum_receive dr on c.id=dr.customer_id
inner join datum_return dr2 on c.id=dr2.customer_id
inner join customer_pending_problem cpp on c.id=cpp.customer_id
where 1=1
and p.project='万科城'
and dr.developerLoanVoucherReceiveDate is not null
and dr2.developerLoanVoucherReturnDate is null
and c.status=1
) as id
)
记一个复杂的修改语句
于 2022-04-13 16:43:07 首次发布