Assuming I have 2 datatable with two different number of rows. For example,
Datatable A:
Destination Minutes Rate Amount
AUSTRALIA 100 0.4 100.1
CANADA 80 0.15 191.2
INDIA 50 0.08 231
Datatable B:
Destination Minutes Rate Amount
AUSTRALIA 100 0.32 201.1
USA 40 0.10 431.5
CHINA 10 0.30 872.1
CANADA 80 0.12 191.2
INDIA 50 0.10 231
The goal here is to get the rate from both table and store them column side by side based on the country name. If the country from dt B is not in dt A, we need to put “-”. The output is as below. I have tried the scenario where the dt A and B have the same row number and dt A has more row number than dt B but not the dt A lesser than dt B
New Datatable:
Destination Minutes Amount Rate A Rate B
AUSTRALIA 100 201.1 0.4 0.32
CANADA 80 191.2 0.15 0.12
INDIA 50 231 0.08 0.10
“-” 40 431.5 - 0.10
“-” 10 872.1 - 0.30