Charles_Access
New member
- Local time
- Today, 05:57
- Joined
- Oct 19, 2013
- Messages
- 2
I am trying to combine two peculiar tables in Microsoft Access and have been unable to do so even after doing a lot of brainstorming and searching on the internet. I will really appreciate if someone could help me.
The two tables are “spend” and “export”
Spend
+-------------+--------+-------+-------+
| Country | Metal | Month | Spend |
+-------------+--------+-------+-------+
| China | Iron | Jan | 100 |
| China | Iron | Feb | 200 |
| China | Iron | March | 300 |
| India | Iron | Jan | 400 |
| India | Copper | April | 500 |
| Spain | Zinc | June | 600 |
+-------------+--------+-------+-------+
Export
+-------------+-------+------+--------+
| Country | Metal | Year | Export |
+-------------+-------+------+--------+
| China | Iron | 2001 | 2,000 |
| India | Iron | 2002 | 4,000 |
| India | Iron | 2003 | 5,000 |
| Spain | Zinc | 2011 | 3,500 |
| Spain | Zinc | 2012 | 4,000 |
| Spain | Zinc | 2013 | 9,000 |
+-------------+-------+------+--------+
Desired Combined Table
+-------------+--------+-------+-------+------+--------+
| Country | Metal | Month | Spend | Year | Export |
+-------------+--------+-------+-------+------+--------+
| China | Iron | Jan | 100 | 2001 | 2,000 |
| China | Iron | Feb | 200 | | |
| China | Iron | March| 300 | | |
| India | Iron | Jan | 400 | 2002 | 4,000 |
| India | Iron | | | 2003 | 5,000 |
| India | Copper | April | 500 | | |
| Spain | Zinc | June | 600 | 2011 | 3,500 |
| Spain | Zinc | | | 2012 | 4,000 |
| Spain | Zinc | | | 2013 | 9,000 |
+-------------+--------+-------+-------+------+--------+
The two tables are “spend” and “export”
Spend
+-------------+--------+-------+-------+
| Country | Metal | Month | Spend |
+-------------+--------+-------+-------+
| China | Iron | Jan | 100 |
| China | Iron | Feb | 200 |
| China | Iron | March | 300 |
| India | Iron | Jan | 400 |
| India | Copper | April | 500 |
| Spain | Zinc | June | 600 |
+-------------+--------+-------+-------+
Export
+-------------+-------+------+--------+
| Country | Metal | Year | Export |
+-------------+-------+------+--------+
| China | Iron | 2001 | 2,000 |
| India | Iron | 2002 | 4,000 |
| India | Iron | 2003 | 5,000 |
| Spain | Zinc | 2011 | 3,500 |
| Spain | Zinc | 2012 | 4,000 |
| Spain | Zinc | 2013 | 9,000 |
+-------------+-------+------+--------+
Desired Combined Table
+-------------+--------+-------+-------+------+--------+
| Country | Metal | Month | Spend | Year | Export |
+-------------+--------+-------+-------+------+--------+
| China | Iron | Jan | 100 | 2001 | 2,000 |
| China | Iron | Feb | 200 | | |
| China | Iron | March| 300 | | |
| India | Iron | Jan | 400 | 2002 | 4,000 |
| India | Iron | | | 2003 | 5,000 |
| India | Copper | April | 500 | | |
| Spain | Zinc | June | 600 | 2011 | 3,500 |
| Spain | Zinc | | | 2012 | 4,000 |
| Spain | Zinc | | | 2013 | 9,000 |
+-------------+--------+-------+-------+------+--------+