insert into cy_czyqx_yh
select distinct a.jhxgr, a.ht_jlbh, a.cpid
from cy_demand a
where a.jhxgr is not null
and a.ht_jlbh is not null
and a.cpid is not null
and not exists (select 1
from cy_czyqx_yh b
where a.jhxgr = b.rydm
and a.ht_jlbh = b.yhjlbh
and a.cpid = b.cpid);
select distinct a.jhxgr, a.ht_jlbh, a.cpid
from cy_demand a
where a.jhxgr is not null
and a.ht_jlbh is not null
and a.cpid is not null
and not exists (select 1
from cy_czyqx_yh b
where a.jhxgr = b.rydm
and a.ht_jlbh = b.yhjlbh
and a.cpid = b.cpid);