Linked Questions

Popular Questions

I have a question about the best way to join below datasets.

Data Set 1:

Order Material Qty
5111 chair 4
5111 table 1
5111 book 3
6222 chair 4
6222 table 1

Data Set 2:

Order Customer Type Customer ID
5111 Sold-to 222
5111 Ship-to 333
5111 Payer 444
6222 Sold-to 555
6222 Ship-to 777
6222 Payer 888

Data Set after Join:

Order Material Qty Customer Type Customer ID
5111 chair 4 Sold-to 222
5111 chair 4 Ship-to 333
5111 chair 4 Payer 444
5111 table 1 Sold-to 222
5111 table 1 Ship-to 333
5111 table 1 Payer 444
5111 book 3 Sold-to 222
5111 book 3 Ship-to 333
5111 book 3 Payer 444
6222 chair 4 Sold-to 555
6222 chair 4 Ship-to 777
6222 chair 4 Payer 888
6222 table 1 Sold-to 555
6222 table 1 Ship-to 777
6222 table 1 Payer 888

I think that this is a common problem, where two datasets which have several lines linked to the same table key (order) need to be joined.

However, when having quantities involved, how can I prevent having quantity duplication issue after the join?

Thank you for your help.

Related Questions