>Staging Tables: non-normalized All have CUSTNUM field, and no unique Identifier >The Transformers and Visual_Inspection tables have both a CUSTNUM and TRANSNUM. >Customer - Parent > Transformers - Child > Visual_Inspection - Child > >Live Tables: Normalized All have integer unique Identifier >Contacts - Parent > Equipment - Child > Inspections - Grand-Child. >>In my normalized table the CUSTNUM is stored in the Contacts table ONLY and the equipment is linked by the unique ID of the Parent, Likewise, the EQUIPNUM is stored in the Equipment table only, and the Inspections table is linked to it by the unique equipment ID.
> >insert into lab.inspection( > lab.insepction.id_equipment, > lab.inspection.dateinsp, > lab.inspection.optemp, > .... more fields continue >select > "some way to get the unique equip ID based on the CUSTNUM and EQUIPNUM in src.transformers" > src.transformers.datinp, > src.transformers.optemp, > .....more fields continue >from src.visual_inspection >>