物料工序生产要素1.sql 496 B

123456789
  1. select c.RecID as id,c.ItemNum,i.Descr as ItemDescr,c.Op,r.Descr as OpDescr,c.Line,c.Typed,g.Comments as TypedDescr,c.ItemCode,c.Descr,c.IsMain
  2. from ItemOpCondition c
  3. left join ItemMaster i
  4. on c.Domain=i.Domain and c.ItemNum=i.ItemNum
  5. left join RoutingOpDetail r
  6. on c.Domain=r.Domain and c.ItemNum=r.RoutingCode and c.Op=r.Op
  7. left join GeneralizedCodeMaster g
  8. on c.Domain=g.Domain and c.Typed=g.Val and g.FldName='OpConditionType'
  9. where c.Domain='{<UserFactoryNum>}' and c.CodeType='Prod'