Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables. None of the field names are the same.
Temp_1 and Temp_2 will be dropped
I want a table that understands that YEAR1=YEAR2 and MONTH1=Month2 and and keep the Value 1 and Value 2 field exactly the same
Thanks for the help
As below.
TEMP_1:
LOAD YEAR1 as YEAR,
MONTH1 as MONTH,
VALUE1
FROM abc;
Outer Join
TEMP_2:
LOAD YEAR2 as YEAR,
MONTH2 as MONTH,
VALUE2
FROM xyz;
T:
load year1 as Year,month1 as Month,v1;
load * Inline [
year1,month1,v1
2024,Jan,10
2024,Feb,20
];
T1:
load year2 as Year,month2 as Month,v2;
load * Inline [
year2,month2,v2
2024,Mar,30
2024,Apr,40
];
thanks for your assistance, but this code only creates the table 1 and 2, but not the merged one
As below.
TEMP_1:
LOAD YEAR1 as YEAR,
MONTH1 as MONTH,
VALUE1
FROM abc;
Outer Join
TEMP_2:
LOAD YEAR2 as YEAR,
MONTH2 as MONTH,
VALUE2
FROM xyz;