Neil的备忘录

just do it
posts - 66, comments - 8, trackbacks - 0, articles - 0

根据查询的结果进行更新

Posted on 2009-05-22 16:30 Neil's NoteBook 阅读(152) 评论(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';



只有注册用户登录后才能发表评论。


网站导航: