Combine two table with a matching table
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Infrecon
6 - Meteoroid
‎03-03-2022
04:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello all
I have a question. I have two tables with different information. One table denotes material consumption, the other table denotes material orders.
The problem is that these are pulled from different systems and have no match. But I have a matching table which could connect them accordingly.
Table 1
Date | Location | Name_1 | Table_ID1 | Amount_1 |
01.02.2022 | A PB 1 | Name 1 | KZ0312 | 2 |
01.02.2022 | A PB 1 | Name 2 | KZ0131 | 4 |
01.02.2022 | A PB 1 | Name 3 | KZ0132 | 2 |
... | ... | ... | ... | ... |
Table 2
Date | Location | Name_2 | Table_ID2 | Amount_2 |
01.02.2022 | A PB 1 | Name 1_X | GL511642 | 22 |
01.02.2022 | A PB 1 | Name 2_X | GL06513584 | 42 |
01.02.2022 | A PB 1 | Name 2_X | GL43151 | 21 |
... | ... | ... | ... | ... |
Matching Table
Table_ID1 | Table_ID2 | Name_1 | Name_2 | Product_Name |
KZ0312 | GL06513584 | Name 1 | Name 2_X | Product 1 |
KZ0131 | GL511642 | Name 2 | Name 1_X | Product 2 |
KZ0132 | GL43151 | Name 3 | Name 3_X | Product 3 |
... | ... | ... | ... |
It is important to know that there are items in table 1 which are consumed but which have not been ordered (stock), so they do not appear in table 2.
The matching table has all the items listed.
The aim should be to get the following table:
Desired result
Location | Product Name | Amount_1 (used) | Amount_2 ordered |
A PB 1 | Product 1 | 2 | 42 |
A PB 1 | Product 2 | 4 | 22 |
A PB 1 | Product 3 | 2 | 21 |
... | ... | ... | ... |
Labels:
2 REPLIES 2
binuacs
21 - Polaris
‎03-03-2022
04:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
saveeshkumar
9 - Comet
‎03-03-2022
04:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
