1
I have two tables of data, being them: table A and table B. I want to join the rows of table B with A under the following conditions:
If a line occurs in B and not in A, add it to A. If a line occurs more in B than in A, add it to A until it occurs as often in A as in B. If I have the following two tables:
TabelaA TabelaB
2 4 1 3 2 2 2 1
2 2 2 1 2 4 1 3
4 5 2 4 2 4 1 3
1 4 2 5 2 4 1 3
2 4 1 3 5 3 2 3
I want to have the following table:
Tabela A + B
2 2 2 1
2 4 1 3
2 4 1 3
2 4 1 3
4 5 2 4
1 4 2 5
5 3 2 3
You can achieve this with an sql query?
Are each of the table elements in a different column? For example, the first row of the table
A
, "2 4 1 3", are 4 different columns?– João Martins