Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using applymap with string field (Customer Name):
CUST_NAME_MAP:
Mapping Load
upper(trim(firstname)) as First_NAME,
'YES'
from
Customer.qvd
(qvd);
Customer_New:
Load
Customer Alt ID,
upper(trim(FIRST_NAME)) as FIRST_NAME,
ApplyMap('CUST_NAME_MAP',upper(trim(FIRST_NAME)),'NO') as CUST_MEM_FLAG,
from
Customer_new.qvd
(qvd);
Its giving incorrect output.
Thanks,
H
Is the fieldname in Customer.qvd 'firstname' or should it be 'FIRST_NAME' like you use for Customer_new.qvd?
'FIRST_NAME'
Ok, then to create your mapping table you need to use FIRST_NAME too:
CUST_NAME_MAP:
Mapping Load
upper(trim(FIRST_NAME)) as First_NAME,
'YES'
from
Customer.qvd
(qvd);
I am using FIRST_NAME it was a typo.
I think so its not handling string value for comparison.
If you say, it doesn't work / giving incorrect output, what does this mean in more detail?
I believe a string value mapping should be possible, seems to work for me:
CUST_NAME_MAP:
Mapping Load
upper(trim(FIRST_NAME)) as First_NAME,
'YES'
Inline [
FIRST_NAME
Stefan
Peter
Thomas
];
Customer_New:
Load
Customer_Alt_ID,
upper(trim(FIRST_NAME)) as FIRST_NAME,
ApplyMap('CUST_NAME_MAP',upper(trim(FIRST_NAME)),'NO') as CUST_MEM_FLAG
INLINE [
Customer_Alt_ID, FIRST_NAME
1, SteFaN
2, Stefan
3, Hanno
4, Tomas,
5, THOmas
];