Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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
You are right! It was a good shoot in the dark...
For me, SQL is something of a "blackbox". ![]()
Thanks for your help, jsn!