Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shiveshsingh
Master
Master

Left join

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?

3 Replies
Clever_Anjos
Employee
Employee

table:

load

a,b,c,d,e

from yourqvd(qvd);


left join(table)

load a,b,c,d,g,h

from otherqvd(qvd);


YoussefBelloum
Champion
Champion

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

its_anandrjs

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;