Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
Usually I don't struggle with the ApplyMap function, has been working great. However, when I try to use it with an INLINE lookup such as the example below, it will not map to AAContactNoDesc. Am I doing something wrong here?
MAP_AACONTACTNO:
MAPPING LOAD * INLINE
[AAContactNumber, AAContactNoDesc
'0113 438 0120','Flying to Mars'
'0330 780 7436','Flying to the Moon'];
LOAD Letter_code,
DELIVERY_NNA,
ApplyMap('MAP_AACONTACTNO',AAContactNumber) as AAContactNoDesc,
LoadedDate
FROM [\\abcdef.qvd] (qvd);
Many thanks, Alex
Thanks Peter.
And for those that have been following this post, it seems that the key function that really made a difference was KeepChar. The data loading into AAContactNumber was formatted like 0800 123 1234, however, the spaces between the numbers were not being seen by QV as spaces. Therefore, KeepChar filters out all non-numerics to leave a clean text string that could be mapped to a description.
MapSubString('MAP_AACONTACTNO2',text(keepchar(AAContactNumber,'0123456789'))) as AAContactNoDesc,
For reference, I was obviously just assuming that what appeared to be spaces were spaces and treated as spaces .
Thanks to KeepChar, I can now successfully map millions of calls to a description.