-- 1.存款品种 历史记录更新
update
	t_ifm_intbill_batch_int i
set
	finvestvarietiesid = (
	select
		d.finvestvarietiesid
	from
		t_cim_deposit d
	where
		d.fid = i.floanbillid )
where
	finvestvarietiesid = 0
	and exists (
	select
		d.finvestvarietiesid
	from
		t_cim_deposit d
	where
		d.fid = i.floanbillid );

