Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
table1:
customerid ,bookingloc, deliverloc
100 1 2
table2:
locid locname
1 bangalore
2 chennai
how i can achieve below output as w/o null records
customerid bookingloc deliveryloc
100 bangalore chennai
use applymap:
Table2:
mapping load
locid, locname
from ..
table1:
load customerid,
applymap('Table2', bookingloc) as bookname,
applymap('Table2', deliverloc) as delivername
from
You could use mapping with applymap() for this, see: Mapping … and not the geographical kind.
- Marcus
or add a table
table1:
load * inline [
customerid ,bookingloc, deliverloc
100, 1, 2
200, 2, 1
];
table2:
load locid as bookingloc, locname inline [
locid , locname
1, bangalore
2 , chennai
];
table3:
load bookingloc as deliverloc, locname as deliverlocname resident table2;
Hi Rudolf,
We don't have Common Key column...How you will map the table....Can you Please explain....
Thanks & Regards
Raja
Do simple inner join
load customerid ,
bookingloc,
deliverloc
From table1
inner join
load locid as deliverloc,
locname as deliveryloc
From Table2
that's how applymap works. just test my solution. you donot Need a common key.
you give bookingloc as Input tp applymap and get bookingname,
same with deliverloc
try it
Hi,
find the attachment.
Good one
Have a look at the attachment. Hope it will help you.