G
Guest
Could someone please help me with the following? I need to return the last
installed part(s) in a piece of equipment. Here are the tables;
Equipment – EquipUID
Repair Order – RepairOrderUID, EquipUID, RepairOrderDate, RepairOrderType
Parts Used – PartLineUID, RepairOrderUID, PartUID
Master Parts – PartUID, PartType
Each piece of equipment can have 1-n Repair Orders, each Repair Order can
have 1-n parts used, all parts used are in the Master Parts Parent table.
The part type installed must be “1†and the Repair Order must be of type “Iâ€.
It does not matter the exact date of the installation just that it is the
latest one. A piece of equipment may have more than one part type of “1â€
installed in the latest repair order.
I’ve tried several different Group By queries and end up getting stuck at
the same spot, I end up with the Equipment UID and all parts installed not
just the latest one or I get all of the Repair Orders and all of the parts
installed not just the latest one.
Thanks in advance,
Jim
installed part(s) in a piece of equipment. Here are the tables;
Equipment – EquipUID
Repair Order – RepairOrderUID, EquipUID, RepairOrderDate, RepairOrderType
Parts Used – PartLineUID, RepairOrderUID, PartUID
Master Parts – PartUID, PartType
Each piece of equipment can have 1-n Repair Orders, each Repair Order can
have 1-n parts used, all parts used are in the Master Parts Parent table.
The part type installed must be “1†and the Repair Order must be of type “Iâ€.
It does not matter the exact date of the installation just that it is the
latest one. A piece of equipment may have more than one part type of “1â€
installed in the latest repair order.
I’ve tried several different Group By queries and end up getting stuck at
the same spot, I end up with the Equipment UID and all parts installed not
just the latest one or I get all of the Repair Orders and all of the parts
installed not just the latest one.
Thanks in advance,
Jim