U8BOM查询

SELECT a.bomid,b.OpComponentId,a2.Description AS [工序名称],
g.cinvcode as 母件编码,
g.cInvName as 母件名称,
g.cInvStd as 母件规格,
a.Version  as bom版本号,
f.cinvcode as 子件编码,
f.cInvName as 子件名称,
f.cInvStd as 子件规格,
b.BaseQtyN as 基本用量_分子,
b.BaseQtyD as 基本用量_分母 
FROM bom_bom a                                         ---BOM资料 
LEFT JOIN bom_opcomponent b ON b.BomId = a.BomId ---BOM子件资料 
LEFT JOIN bom_parent c ON a.bomid=c.bomid       ---BOM母件资料
LEFT JOIN bas_part d ON b.componentid=d.partid  ---物料表跟子件关联
LEFT JOIN bas_part  e ON c.parentid=e.partid    ---物料表跟母件关联
LEFT JOIN inventory f ON d.invcode=f.cinvcode   ---子件
LEFT JOIN inventory g ON e.invcode=g.cinvcode   ---母件
LEFT JOIN sfc_proutingpart a1 ON  a1.partid =e.partid
LEFT JOIN sfc_proutingdetail a2 ON a1.PRoutingId =a2.PRoutingId AND a2.OpSeq=b.OpSeq

WHERE 1=1  AND g.cInvCode='a1124'

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值