Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I have a table contains two columns
Size Length
1 2
in Script i want to add to this data table a column from another table: Department
Department
A
B
The result should be:
Department Size Length
A 1 2
B 1 2
how can I do that?
Thanks in advance
Hi,
Load Size, Length,1 as Dummy;
Load * inline [
Size, Length
1 , 2 ];
Join
Load Department,1 as Dummy;
Load * Inline [
Department
A
B ];
Regards
Anand
You can perform a join (INNER, LEFT, RIGHT).
The join is a Natural Join made over all the common Fields (where the field name is the same).
If your two tables do not share a common field as you above example you can use the JOIN prefix to get your desired result. See below
Table1:
LOAD * INLINE
[
Size, Length
1 , 2
]
;
JOIN
LOAD * INLINE
[
Field
A
B
]
;
hi Jacob,
Use applymap () by using if any matching column :
ProductMap:
Mapping Load
ProductID
ProductName
from Table1;
Table3:
Load
ApplyMap(' ProductMap ' ProductName ) as ProductID,
ProductName ,
ProductDescription
from Table2;
Regards
Neetha