Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have table with kod emply and name
em-id
name
the secend table have columns for each role , the data is "em-id"
meneger-id
first-id
secend-id
how do i conect this 2 tables ?
to show the names for each role and not the em-id
thanks'
yarin
Ok, if I understand this correctly, you can use a mapping load here:
NameMap:
MAPPING LOAD
em-id,
name
FROM [first table];
SecondTable:
LOAD
meneger-id,
ApplyMap('NameMap', meneger-id) as managername,
first-id,
ApplyMap('NameMap', first-id) as firstname,
secend-id,
ApplyMap('NameMap', secend-id) as secondname
FROM [second table]
Hi Yarin,
I can´t understand you so well. Could you attach an example?
Regards
Miguel del Valle
Hi,
Can you provide sample data of two table or provide
those 2 table metadata.
Regards
Hi,
In your tables you don't have any common field of two table.
just you can take one more field as rownumber (rowno()) in your application.
Than you can join the tables.
T1:
Load rowno() as row,
emp_id
from
(.....)
left join T1:
load rowno() as row,
name
from
(.......)
Regards
Hi,
I can't understand this ,not sure
T1:
load
em-id
name
concatenate
T2:
load
em-id
meneger-id
first-id
secend-id
Hi
you can make a join on the basis of em-id(which is the common field in both tables).
Ok, if I understand this correctly, you can use a mapping load here:
NameMap:
MAPPING LOAD
em-id,
name
FROM [first table];
SecondTable:
LOAD
meneger-id,
ApplyMap('NameMap', meneger-id) as managername,
first-id,
ApplyMap('NameMap', first-id) as firstname,
secend-id,
ApplyMap('NameMap', secend-id) as secondname
FROM [second table]