惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
U
Unit 42
N
Netflix TechBlog - Medium
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
小众软件
小众软件
V
Visual Studio Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
博客园 - 叶小钗
GbyAI
GbyAI
爱范儿
爱范儿
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
D
DataBreaches.Net
博客园_首页
D
Docker
A
About on SuperTechFans
G
Google Developers Blog
I
InfoQ
T
The Blog of Author Tim Ferriss
V
V2EX
博客园 - Franky

博客园 - 晓岚

2023年最后一天:有收获有遗憾 2021年最后一晚:蛰伏的一年 2020年最后一晚:变局中的一年 2019年最后一晚:四处把抓的一年 2018年最后一小时 2017年最后一小时 2016年最后一晚上 2015年最后半小时 2014年第一小时 洛杉矶留念 2013年最后一小分钟 2012年总结&2013展望 向岁月致敬 对未来憧憬 2011年最后一小时 2010年最后一小时 2008年的最后一分钟 Status Code Definitions --Hypertext Transfer Protocol -- HTTP/1.1 利用客户端代理和SOAPHeader进行Webservice权限控制 子数组的最大和 最大子数组 Javascript中Eval函数的使用 - 晓岚 - 博客园 软件素质历练
修改HuiHuo工序的上道工序的IFV为1
晓岚 · 2008-11-11 · via 博客园 - 晓岚

update t_operation
set t_operation.isrestrictionenabled = '1'
from t_operation a,t_operation b
where a.opid = b.opid and a.opno = (select convert(int,opno)-5 from t_operation c where c.opname = '回火' and c.opid = b.opid)

select convert(varchar,convert(int,opno)-5) from t_operation c
where c.opname = '回火' and c.opid = t_operation.opid
 

select convert(int,b.opno) from t_operation b

update t_operation
set isrestrictionenabled = '1' where opid in (
select opid from t_operation where opid in (
select routingid,convert(varchar,convert(int,opno)-5) from t_operation where opname = '回火'))


select * from t_operation where opname = '感应淬火' order by routingid,opno


-- 方法一:
update t_operation
set isrestrictionenabled = '1'
where t_operation.opno = (select convert(varchar,convert(int,c.opno)-5) from t_operation c
where c.opname = '回火' and c.routingid = t_operation.routingid and t_operation.opno+5 = c.opno)

-- 方法二:
update t_operation
set isrestrictionenabled = '1' where opid in (
select opid from t_operation a,
(select c.routingid,convert(varchar,convert(int,c.opno)-5) as opno from t_operation c where c.opname = '回火') as b
where a.routingid = b.routingid and a.opno = b.opno)

-- 方法三:
update t_operation
set IsRestrictionEnabled='1'
where opid in
(
select t.opid
from t_operation t
inner join (select routingid,(Convert(int,opno)-5) as opno from t_operation where opName='回火') as a on t.routingid=a.routingid and t.opno=a.opno
)