生产线物料维护1.sql 547 B

123456789
  1. select pl.RecID id,pl.Line,rd.title as Describe,(pl.Site + ' ' + wm.Descr) as Site,pl.Part,pl.Rate,pl.SetupTime
  2. ,pl.SkillNo,ISNULL(pl.SetupTime, 0)*60 time1,(CAST(a.Op as nvarchar(10)) +' '+a.Descr) as OpStdOp
  3. FROM ProdLineDetail as pl LEFT JOIN RoutingOpDetail a ON pl.Op=a.Op and pl.Part = a.RoutingCode and pl.Domain = a.Domain
  4. LEFT JOIN rf_dictionary rd on pl.Line = rd.code
  5. AND pl.Line IS NOT NULL
  6. AND pl.Line <> ''
  7. AND TRIM(pl.Line) <> ''
  8. left join WorkCtrMaster wm on pl.Domain = wm.Domain and pl.Site = wm.WorkCtr
  9. where pl.IsActive = 1