
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ApplyMap in a SQL statement
I am pulling data from a SQL database into Qlikview and attempting to Apply a Mapping.
ErrorSource: Microsoft SQL Server Native Client 11.0, ErrorMsg: 'ApplyMap' is not a recognized built-in function name.
I'm guessing this message is because I am attempting to use 'ApplyMap' in the select statement and it is not a SQL function. Does someone know of another way to accomplish this?
Thank You
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use a preceding LOAD statement:
LOAD
FIELD,
ApplyMap('MAP', FIELD, 'No Map found') as MappedField;
SELECT FIELD FROM ...;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the SQL codes(where you connect Qlik to your DB) itself, you can't use applymap. use after you pull the tables.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try doing it in the LOAD statement (preceding load) to use ApplyMap because ApplyMap is a QlikView function.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use a preceding LOAD statement:
LOAD
FIELD,
ApplyMap('MAP', FIELD, 'No Map found') as MappedField;
SELECT FIELD FROM ...;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Preceding load worked but my following SELECT statement did not pull in the rest of the data,
LOAD
FIELD,
ApplyMap('MAP', FIELD, 'No Map found') as MappedField;
SELECT FIELD, Field2, field3,
FROM ...;
I only get the MAP and FIELD.
O think I'm on the right track though. thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if you want also the other 2 fields, add the 2 fields to the load (in bold)
LOAD
FIELD,
Field2, field3,
ApplyMap('MAP', FIELD, 'No Map found') as MappedField;
SELECT FIELD, Field2, field3,
FROM ...;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all. Very helpful!
