0
I have two tables that we need to unify in one, in a complete way: Consider everything there is in the first, see if it matches with the second and what does not hit or repeat, include in the lines of the end.
Note that key 2 is repeated in the second table, therefore, a procv would not solve in the case of 2 or more incidences. Key 5 has no incidence in the first table. In these cases, they were inserted at the end of the third table.
Following example:
Tabela 1
A B C D E F
1 Brasil Carro Honda Fit 100
2 Chile Carro Honda CRV 200
3 Russia Moto yamaha Crosser 150
4 Russia Carro Volvo v40 300
Tabela 2
U V X Y W Z
1 Brasil P - - 100
2 Chile - 4rodas - 100
2 Uruguai G 4rodas - 100
5 EUA G 8rodas Transporte 400
Tabela 3 unificada
A B C D E F V X Y W Z
1 Brasil Carro Honda Fit 100 Brasil P - - 100
2 Chile Carro Honda CRV 200 Chile - 4rodas - 100
3 Russia Moto yamaha Crosser 150
4 Russia Carro Volvo v40 300
5 EUA EUA G 8rodas Transporte 400
2 Uruguai G 4rodas - 100
Could you help me?
Looks like a
cross join
, only taking into consideration beyondtabela1.A = tabela2.U
other factors, such astabela1.B = tabela2.V
– Jefferson Quesado
On the link How to Simulate a full Outer Join in Excel?, you will find 3 ways to resolve this issue.
– Fernando