Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MAPPING LOAD and MAP USING commands

Hi,

I'm confused over the MAPPING LOAD and MAP USING commands. The following piece of code works fine:

--------------------------------------

map1:
MAPPING LOAD * INLINE [x, y
A, Automatic
M, Manual
V, Variomatic];

MAP 'transmission_type_decoded' USING map1;

SQL SELECT "transmission_type_decoded" FROM "VPS_MD".dbo."cbr_valda_a";

-------------------------------------

Values for ""transmission_type_decoded" are tranlslated from A to Automatic etc.

But when I add the "AS" clause to the SELECT statement, the translation fails:

SQL SELECT "transmission_type_decoded" AS "Gearbox" FROM "VPS_MD".dbo."cbr_valda_a";

The value "M" returns just the letter M!

I really hope someone can give me a hint!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

I haven't tested this so it's a bit of a shot in the dark but I suspect that the entire SQL statement is evaluated and a dataset returned from the DB before any QlikView processing takes place. When the data enters QlikView the field is named Gearbox instead and QlikView has now way of knowing that you want to apply the mapping on the field Gearbox.

Try changing the MAP USING to point to Gearbox instead:

MAP 'Gearbox' USING map1;

Hope this works

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi,

I haven't tested this so it's a bit of a shot in the dark but I suspect that the entire SQL statement is evaluated and a dataset returned from the DB before any QlikView processing takes place. When the data enters QlikView the field is named Gearbox instead and QlikView has now way of knowing that you want to apply the mapping on the field Gearbox.

Try changing the MAP USING to point to Gearbox instead:

MAP 'Gearbox' USING map1;

Hope this works

Not applicable
Author

You are right! It was a good shoot in the dark...

For me, SQL is something of a "blackbox". Smile

Thanks for your help, jsn!