Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have below two tables.
Table 1
ID Value
1 10
2 20
3 30
Table 2
ID Amount Gender
1 100 Male
2 200 Female
4 400 Male
5 500
So If I left join these 2 tables then expected result should be :
Table 1
ID Value Amount Gender
1 10 100 Male
2 20 200 Female
3 30 - -
this is working fine If I join with specific table mentioned in joining condition as below
Load ID,
Value
From Table1;
Left join (Table1)
Load ID,
Amount
From Table2;
But it is not working when I am using * as below as I have only one common key between these tables:
Table1:
Load *
From Table1;
left join (Table1)
Load *
From Table 2;
I am getting below results :
ID Value Amount
1 10 -
2 20 -
3 30 -
Hi, try to use different Table name as Table1 is already existing and you left joining on it, not your new one. So your script could look like this:
NoConcatenate
MAIN:
Load *
resident Table1;
left join (MAIN)
Load *
resident Table2;
drop tables Table1, Table2;