Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Table A
ID, Columnc
A,111
B,222
C,333
Table B
ID,ColumnC
A, XXX
B,YYY
C,kkk
D,aaa
E,bbb
answer to above question must be 3 rows, 2 columns as per my understanding but correct answer is below one , how is it possible ?
AM not sure try to like below
b:
LOAD * INLINE [
ID, ColumnC
A, XXX
B, YYY
C, kkk
D, aaa
E, bbb
];
left join(b)
a:
LOAD * INLINE [
ID, Columnc
A, 111
B, 222
C, 333
];
AM not sure try to like below
b:
LOAD * INLINE [
ID, ColumnC
A, XXX
B, YYY
C, kkk
D, aaa
E, bbb
];
left join(b)
a:
LOAD * INLINE [
ID, Columnc
A, 111
B, 222
C, 333
];
Hi Chaitanya,
Answer to above question must be 3 rows, 2 columns is correct.
Please find the attached file for details.
Thanks & Regards,
Neha
Hi Chanty,
if tables is in reverse order yeah i agree but with the above i hope its not the output.
Hi Neha,
Thank you, even i got 3 rows , 2 columns i guess there is a mistake
Hi Chaithanya,
Chanty4u has given correct output..
Hi Manoj,
Ok but may be if table A becomes B , it might work Thank you
Reason is ColumnC and Columnc are 2 different columns...
thats why it created 3 Columns after left join..
Chanty4u's reply gives justification of the answer..
5 rows and 3 columns is correct..
In that case also it will create 3 columns only
Hi,
Even table gets reverse then with the Left join rule (The keyword LEFT will retain rows from the left table but only matching rows from the right table) the Chatys output is correct.
Only the table no of rows difference is there that's why the output must b differ.
Thanks,
Neha