从一个表查询数据插入到另外一个表中
-- 插入数据
insert into a_linshibiao (xh,termcode,kcbh)select cc.xh,cc.termcode,cc.kcbh from py_cj cc left join xj on cc.xh=xj.xh where (cc.termcode=36 or cc.termcode=37) and (xj.nj =2019) and (cc.xwbj=0 or isnull(cc.xwbj,'')=0)
从一个表查询数据插入到另外一个表中
-- 插入数据
insert into a_linshibiao (xh,termcode,kcbh)select cc.xh,cc.termcode,cc.kcbh from py_cj cc left join xj on cc.xh=xj.xh where (cc.termcode=36 or cc.termcode=37) and (xj.nj =2019) and (cc.xwbj=0 or isnull(cc.xwbj,'')=0)
本文由 用户 于 2022-12-29 发布在 夸智网,如有疑问,请联系我们。
本文链接:https://www.kuazhi.com/post/336084.html
发表评论