Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello guys,
trying allways to search berofe asking and ussualy it works not now...
i am working of messy data set where regarding on origin of the data (ID field) i need to fill in one column (code) from many tables.
Here is the situation:
table1 | |||
---|---|---|---|
code | description | id | amount |
- | 1 | 12 | |
- | 2 | 12 | |
- | 3 | 12 | |
- | code [a4] | 4 | 34 |
- | code [a5] | 5 | 23 |
- | code [a6] | 6 | 13 |
- | - | 7 | 35 |
- | - | 8 | 46 |
- | - | 9 | 46 |
p.s. using subfield (description) i know how to extract code.
table 2 | |
---|---|
id | code |
7 | a7 |
8 | a8 |
9 | a9 |
table 3 | |
id | code |
1 | a1 |
2 | a2 |
3 | a3 |
I want to create new table, or fill in TABLE 1 to have this data:
NEW table | |
code_combined | amount |
a1 | 12 |
a2 | 12 |
a3 | 12 |
a4 | 34 |
a5 | 23 |
a6 | 13 |
a7 | 35 |
a8 | 46 |
a9 | 46 |
Tried to use left join, but data from Table 2 and Table 3 starts to "fight", first loaded - wins. Other IDs remains empty.
Any ideas?
Any ideas?