Files
ibs-app-fullstack/sql/update_cust_info.sql
2026-03-04 14:31:07 +08:00

29 lines
778 B
SQL

update cust_info_merchant a
join
(select *
from ibs_anchor_address
where address_name = '注册地址'
and delete_status = '0'
and address_status = '1') b
set a.region_code = b.region_code
where b.anchor_id = a.social_credit_code;
update cust_info_business a
join
(select *
from ibs_anchor_address
where address_name = '注册地址'
and delete_status = '0'
and address_status = '1') b
set a.region_code = b.region_code
where b.anchor_id = a.social_credit_code;
update cust_info_retail a
join
(select *
from ibs_anchor_address
where address_name = '户籍地址'
and delete_status = '0'
and address_status = '1') b
set a.region_code = b.region_code
where b.anchor_id = a.cust_idc;