Manufacturing Part Maps - How to Use Recursive T-SQL to Show Hierarchies from Self-Joined Tables
A very common problem in querying ERP or manufacturing MRP systems is that they use “self-join” tables to store their part information. These tables store “bill of materials” or “BOM” information, where complete assemblies of items can be found. However, it is often not so easy to easily show where a particular part “lives”. Is it 5 levels deep in the tree? 10 levels? What is the parent’s parent? What is the top level part? In this episode I will show you how to query this information using recursion, so that you can see the entire list of parts for a selected child part. Then, we’re going to pivot this hierarchy so that it can be inserted into a table which can then be viewed using tools like Power BI, which can create hierarchies on the fields we created, resulting in visuals with lots of depth and information.
Want to get access to premium content made just for you and have a chat with me? Find me on Patreon :
/ mackenziedataengineering
Want to work with me 1:1? Contact me today and book your free 20 min consultation!
Contact form you can find at http://www.mackenziemackenzie.com/
Follow me on social media:
/ mackenziedataanalytics
/ seamacke
/ seamacke
/ seamacke
/ psmackenzie
Thank you to my viewers!
Mention Promo Code SMDE25TWELVE for 25% off a twelve-month virtual machine subscription at:
https://beaverdamtechnologies.ca
Got a YouTube Channel? I use TubeBuddy, it is awesome. Give it a try:
https://www.tubebuddy.com/seanmackenz...
• Manufacturing Part Maps - How to Use Recur...