Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Quick question, I have two tables loaded from an SQL database.
TABLE1:
A
B
C
TABLE2:
A
D
My desired output is:
-----------------
TABLE3:
A&B
C
D
-----------------------
A & B should be grouped into one single column, please keep in mind that these two tables are coming from an SQL DB and I am currently joining them with a Join().
Thanks
Load both the tables as it is and do this
Table 3:
Load A&B as key,
C,
D;
left join(Table2)
Load * Resident Table1;
If A is the only join key, then do this in three steps - concatenate the A and B values, then join the two on A, and finally drop the A and B values.
LOAD A, B, C, D, A & B as AB
FROM ...
Left Join
LOAD A, D
FROM ...
DROP Fields A, B;
If the join key is more than just A, then you will need to supply more details.