找回密码
 立即注册
搜索
查看: 1156|回复: 0

通过数据库更新养护类型

[复制链接]

273

主题

158

回帖

1697

积分

版主

积分
1697

活跃会员宣传达人突出贡献优秀版主

发表于 2025-10-10 17:17:13 | 显示全部楼层 |阅读模式
merge into t_ware_ext a
using  (select  * from  t_ware  ) b
on (a.wareid=b.wareid and a.compid=b.compid  and  b.warecode='101111')
when matched then
  update  set maintain_type =2   
where  compid =2  ;
merge into t_ware_ext a
using  (select  * from  t_ware  ) b
on (a.wareid=b.wareid and a.compid=b.compid  and  b.warecode='102222')
when matched then
  update  set maintain_type =2   
where  compid =2  ;




---更新养护类型
merge into t_ware_ext a
using  (select  * from  t_ware  ) b
on (a.wareid=b.wareid and a.compid=b.compid  and  b.warecode='商品编码')
when matched then
  update  set maintain_type =1   ---1 (一般养护) 2 (重点养护)
where  compid =2  ;

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表