勇不言败de小黑

别人笑我忒疯癫,我笑别人看不穿

K3 批量更新BOM用量的

不解释(不懂解释了也没有用),看懂后再动手……


将部分BOM的原料从'01.0050.0011升级为'01.0050.0014,单位用量由以前的降低25%


update b set b.FItemID=(select FItemID from t_ICItem where t_ICItem.fnumber='01.0050.0014'),b.FQty=ROUND(b.FQty*(100-25)/100,(select FQtyDecimal from t_ICItem where t_ICItem.fnumber='01.0050.0014'))
--,b.FAuxQty=b.fqty  
from ICBOM a ,ICBOMCHILD  b,t_ICItem c,t_ICItem d
where a.finterid=b.finterid
and a.fitemid=c.FItemID
and b.fitemid=d.FItemID
and a.FUseStatus=1072
and d.fnumber in 
('01.0050.0011')
and c.fnumber in 
(
'1-00268-2001-00-00',
'1-00888-2001-02-00',
'1-01588-2001-01-00',
'1-01598-2001-01-00',
'1-01608-2001-01-00',
'1-03010-2001-01-00',
'1-03011-2001-00-00',
'1-03011-2001-01-00',
'1-03011-2002-00-00',
'1-03011-2003-01-00',
'1-03011-2004-01-00',
'1-04258-2001-01-00',

'1-04258-2002-01-00'

)

/*
select * from t_BillLockTable
select * from ICBOMCHILD b where b.FAuxQty<>b.fqty
select * from ICBOMCHILD b where b.FAuxQty>=0
go
update b set b.FAuxQty=b.fqty from ICBOMCHILD b where b.FAuxQty<>b.fqty
*/


阅读更多
文章标签: c
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭