Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I would like to merge 2 tables like this:
A, B
1, xx
2, yy
A, C
1, aa
1, bb
2, cc
A, B, C
1, xx, aa
1, xx, bb
2, yy, cc
Do I have to use a left join, or another?
thanks
Left join will do it. Your code will look something like this:
Table1:
load * inline [
A, B
1, xx
2, yy
];
left join (Table1)
load * inline [
A, C
1, aa
1, bb
2, cc
;
I've also attached an example file.
Left join will do it. Your code will look something like this:
Table1:
load * inline [
A, B
1, xx
2, yy
];
left join (Table1)
load * inline [
A, C
1, aa
1, bb
2, cc
;
I've also attached an example file.
Yes left join worked well here
A:
LOAD * Inline
[
A, B
1, xx
2, yy
];
Left Join(A)
LOAD * Inline
[
A, C
1, aa
1, bb
2, cc
];
hi
you can use LEFT JOIN
Like
Table1:
load * inline [
A, B
1, xx
2, yy
];
left join (Table1)
Table2:
load * inline [
A, C
1, aa
1, bb
2, cc
];
output:
A | B | C |
---|---|---|
1 | xx | aa |
1 | xx | bb |
2 | yy | cc |
Regards
Tahemas Momin