Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a mapping table like following
mapping load
short name,long name
KA,karnataka
KA,karnataka1
TN,Tamilnadu
TN,Tamilnadu1
AP,Andhra pradesh
AP,Andhrapradesh1
using applymap I want out put from the mapping table is
long name
karnataka1
Tamilnadu1
Andhrapradesh1
Thanking you,
Anji
Try something like:
Map:
mapping load "short name","long name" where Occurance=2;
Load *, AutoNumber(RecNo(),"short name") as Occurance
Inline [ "short name","long name"
KA,karnataka
KA,karnataka1
TN,Tamilnadu
TN,Tamilnadu1
AP,Andhra pradesh
AP,Andhrapradesh1];
Load
ApplyMap('Map',"name") as Mapped
Inline [
name
KA
TN
AP
]
Try something like:
Map:
mapping load "short name","long name" where Occurance=2;
Load *, AutoNumber(RecNo(),"short name") as Occurance
Inline [ "short name","long name"
KA,karnataka
KA,karnataka1
TN,Tamilnadu
TN,Tamilnadu1
AP,Andhra pradesh
AP,Andhrapradesh1];
Load
ApplyMap('Map',"name") as Mapped
Inline [
name
KA
TN
AP
]
Keep in mind that a mapping table only stores a single translation value (from the 2nd column) per distinct index value (1st column). There simply are no two values in your mapping table for [short name]=KA.
BTW for every distinct value in the first column, a mapping table only keeps the first translation value loaded ! All subsequent "corrections" to a mapping table entry will be ignored. Only the new values will be added.