Posted on 2009-05-22 16:30
Neil's NoteBook 閱讀(160)
評論(0) 編輯 收藏
--更新其他類資料
update da_jbxx j set j.sssx_id = (
select e.id from da_sssxe e
where e.nsrdzdah = j.nsrdzdah
and e.sssq_q = j.sssq_q
and e.sssq_z = j.sssq_z
and e.dm2 = j.dm2
and j.dazt_dm < '100'
);
--更新多用途一次性資料 不帶所屬時期條件
update da_jbxx j set j.sssx_id = (
select e.id from da_sssxe e
where e.nsrdzdah = j.nsrdzdah
--and e.sssq_q = j.sssq_q
--and e.sssq_z = j.sssq_z
and e.dm2 = j.dm2
and j.dm2 = '0000'
)
where j.dm2 = '0000';