Hello!
I have 2 tables called Parts and DeliveryDocuments connected via third table DeliveryDocumentsParts.
One part can have more DeliveryDocuments and one DeliveryDocument can have more parts
I have a form where i have listed all parts but the problem is that each Part is multiplied with different DeliveryDocument
Example:
Part is:
ATE BRAKE DISCS
DeliveryDocumentNumbers are:
6534
43SA
54FF
00DD
Now i have like this:
ATE BRAKE DISCS - 6534
ATE BRAKE DISCS - 43SA
ATE BRAKE DISCS - 54FF
ATE BRAKE DISCS - 00DD
What i want is the part to be listed with last DeliveryDocument in this case ->
ATE BRAKE DISCS - 00DD
Code:
How can i fix this?
Thanks
I have 2 tables called Parts and DeliveryDocuments connected via third table DeliveryDocumentsParts.
One part can have more DeliveryDocuments and one DeliveryDocument can have more parts
I have a form where i have listed all parts but the problem is that each Part is multiplied with different DeliveryDocument
Example:
Part is:
ATE BRAKE DISCS
DeliveryDocumentNumbers are:
6534
43SA
54FF
00DD
Now i have like this:
ATE BRAKE DISCS - 6534
ATE BRAKE DISCS - 43SA
ATE BRAKE DISCS - 54FF
ATE BRAKE DISCS - 00DD
What i want is the part to be listed with last DeliveryDocument in this case ->
ATE BRAKE DISCS - 00DD
Code:
Code:
SELECT Parts.PartID, Parts.PartNumber, Parts.PartName, DeliveryDocuments.DeliveryNumber
FROM Parts INNER JOIN (DeliveryDocuments INNER JOIN DeliveryDocumentsParts ON DeliveryDocuments.DeliveryDocumentsID = DeliveryDocumentsParts.DeliveryDocumentsID) ON Parts.PartID = DeliveryDocumentsParts.PartID
Thanks