Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables,one is having columns a,b,c,d,e
And other table having columns a,b,c,d,g,h.
How to perform left join now?
There are more than 1 common column.
Also if this first table is having 20 records. So after left joning with second table, records count shud remain same right?
table:
load
a,b,c,d,e
from yourqvd(qvd);
left join(table)
load a,b,c,d,g,h
from otherqvd(qvd);
Hi,
just put LEFT JOIN between the first and the second LOAD
example:
table1:
LOAD a,b,c,d,e from table1...
left join
table2:
LOAD a,b,c,d,g,h from table2...
you will have:
table1 with: a,b,c,d,e,g,h
You can do this way also
First way
Table1:
Load
a&'_'&b&'_'&c&'_'&d as Key,
e
From Source;
Join(Table1)
Table2:
Load
a&'_'&b&'_'&c&'_'&d as Key,
g,h
From Source;
Or
Second Way
Table1:
Load
a,b,c,d,e
From Source;
Join(Table1)
Table2:
Load
a,b,c,d,g,h
From Source;