Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I'm having some difficulty implementing the ApplyMap function to a Resident table. My script is noted below. The Temp table becomes the mapping load table. I then try to use that against a resident table. But QlikView gives me the error message below the script saying the Field that is in my Mapping Load table is not found. Any help would be appreciated.
Temp:
Load
POL_N & LOB as PRIOR_CARRIER_KEY,
PRIOR_CARRIER
From C:\QlikView\Daily Quote\v12\PriorCarrier.qvd (qvd);
Concatenate(Temp)
load
POL_N & 'Valuables' as PRIOR_CARRIER_KEY,
PRIOR_CARRIER
From C:\QlikView\Daily Quote\v12\PriorCarrier.qvd (qvd)
where LOB='Home';
PriorCarrier:
Mapping Load
PRIOR_CARRIER_KEY,
PRIOR_CARRIER
Resident Temp;
Load *,
APPLYMAP('PriorCarrier', PRIOR_CARRIER,'Not Available') As PRIOR_CARRIER
Resident [CombinedQuotes];
drop table Temp;
if you are trying to add the field PRIOR_CARRIER to the table then
Load *,
APPLYMAP('PriorCarrier',PRIOR_CARRIER_KEY ,'Not Available') As PRIOR_CARRIER
Resident [CombinedQuotes];
drop table Temp;
And PRIOR_CARRIER_KEY should exist in the table [CombinedQuotes]
Does CombinedQuotes has a field called PRIOR_CARRIER?
Load *,
APPLYMAP('PriorCarrier', PRIOR_CARRIER,'Not Available') As PRIOR_CARRIER
Resident [CombinedQuotes];
Does the table [CombinedQuotes] has the field PRIOR_CARRIER ???
No, I am trying to add that field to CombinedQuotes from the Mapping Table. Do I need to add an empty PRIOR_CARRIER field when loading CombinedQuotes?
you should give the key value which exists in both the tables as below
Load *,
APPLYMAP('PriorCarrier', KEY,'Not Available') As PRIOR_CARRIER
Resident [CombinedQuotes];
drop table Temp;
if you are trying to add the field PRIOR_CARRIER to the table then
Load *,
APPLYMAP('PriorCarrier',PRIOR_CARRIER_KEY ,'Not Available') As PRIOR_CARRIER
Resident [CombinedQuotes];
drop table Temp;
And PRIOR_CARRIER_KEY should exist in the table [CombinedQuotes]
Which field in CombinedQuotes matches with the PRIOR_CARRIER within the Mapping Table? Use this name here:
LOAD *,
APPLYMAP('PriorCarrier', FieldName,'Not Available') As PRIOR_CARRIER
Resident [CombinedQuotes];
DROP Table Temp;
Replace FieldName with the field that I mentioned above....