Skip to content

Instantly share code, notes, and snippets.

@JoshZastrow
Created March 21, 2017 12:51
Show Gist options
  • Save JoshZastrow/7c398efb5824149daf13d482a7696312 to your computer and use it in GitHub Desktop.
Save JoshZastrow/7c398efb5824149daf13d482a7696312 to your computer and use it in GitHub Desktop.
Bar Quantity Yields per Part Number
SELECT PartMtl.PartNum, PartMtl.MtlPartNum, PartMtl.QtyPer, ROUND(12/PartMtl.QtyPer,0) AS 'Bar Yield'
FROM ERP10PROD.Erp.PartMtl PartMtl
WHERE (PartMtl.UOMCode='FT')
@JoshZastrow
Copy link
Author

Divides a 12 ft bar by the part materials qty/per. This gives the qty of parts that a bar can produce. Only looks for material that is required by the foot for parts (vs pieces of material, which would just be 1 for 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment