Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have table A which has about 20 columns. Table B is a small table with 4 columns. I need to match the first 3 columns in table B to the same 3 values in table A. I then need to add the last column in table B to table A. Please see the below code, I get an error when running this code. Before this statement is executed both table A and B are loaded.
Left Join ()
LOAD [A1],
[A2],
[A3],
[B4]
Resident
Where [A1] = [B1]
and [A2] = [B2]
and [A3] = [B3];
Hi,
When joined tablesyou need to concatenate the keys.
Ex.:
Tab_A:
A1 & '#' & A2 & '#' &A3 AS KEY_TABLE_A
A4
A5
A6
...
A40
FROM MY_TABLE_A;
LEFT JOIN (Tab_A)
Tab_B:
B1 & '#' & B2 & '#' & B3 AS KEY_TABLE_A
B4
FROM MY_TABLE_B;
Please try the following script
Left Join ()
LOAD [A1],
[A2],
[A3],
[B4]
Resident ;
Where [A1] = [B1]
and [A2] = [B2]
and [A3] = [B3];