In a union of two tables where the main table is of type: Table A
A.row_Id, A.link_Id
and the secondary one is of the type: Table B
B.link_Id, B.Valor_a1, B.Valor_a2, B.Valor_b1, B.Valor_b2, B.Valor_c1, B.Valor_c2, B.Valor_d1, B.Valor_d2
I want to get a table with the non-null records
A.row_Id, B.Valor_a1, B.Valor_a2
A.row_Id, B.Valor_b1, B.Valor_b2
A.row_Id, B.Valor_c1, B.Valor_c2
A.row_Id, B.Valor_d1, B.Valor_d2
That is, from the second table I want to obtain up to four records (a, b, c, and d) that are not null, since there can only exist a / a and b / a, b and c / a, b, c and d)
I do not know how. Is it possible?
Thanks in advance