Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have following script running in my data model
Sales:
LOAD *;
SQL SELECT
BCOD,
POL_POLICY_NO as POLICY_NO,
TRUNC(TRN_DATE) as T_Date
FROM POLICIES;
Mapvehtype:
Mapping Load POLICY_NO, VEH_TYPE From e:VEH_TYPE.qvd
(qvd) ;
Mapmake:
Mapping Load POL_POLICY_NO as POLICY_NO, MAKE From e:VEH_TYPE.qvd
(qvd) ;
MapYOM:
Mapping Load POL_POLICY_NO as POLICY_NO, YEAR_OF_MAKE From e:VEH_TYPE.qvd
(qvd);
PREMIUM:
Load *,
ApplyMap('Mapvehtype',POLICY_NO, null()) as VEH_TYPE;
Load *,
ApplyMap('Mapmake',POLICY_NO, null()) as MAKE;
Load *,
ApplyMap(' MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
Resident Sales;
drop table Sales;
My above script run perfectly but in my following output report vale for YEAR_OF_MAKE is missing. Can any one tell me what could be the reason for this please
BCOD | POLICY_NO | VEH_TYPE | MAKE | YEAR_OF_MAKE |
AR00 | AR00121B0000253 | THREE WHEELER | KING |
It looks like there is an extra space in front of the third applymap table name.
ApplyMap(' MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
Try
ApplyMap('MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
Hi,
do you have actually any value in Year of Make for this policy number in your VEH_TYPE.qvd?
Try to do in your ApplyMap ('MapYOM',POLICY_NO, 'NOT EXIST') AS YEAR_OF_MAKE
with map you can't see the table (QlikView drop the map tables at the end of the script),
to debug you can try with join instead of map (bold); maybe there are some missing YEAR_OF_MAKE
Sales:
LOAD *;
SQL SELECT
BCOD,
POL_POLICY_NO as POLICY_NO,
TRUNC(TRN_DATE) as T_Date
FROM POLICIES;
MapYOM:
//Mapping
Load POL_POLICY_NO as POLICY_NO, YEAR_OF_MAKE From e:VEH_TYPE.qvd
(qvd);
PREMIUM:
Load *,
ApplyMap('Mapvehtype',POLICY_NO, null()) as VEH_TYPE,
ApplyMap('Mapmake',POLICY_NO, null()) as MAKE
//ApplyMap(' MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
Resident Sales;
drop table Sales;
or you can replace
ApplyMap(' MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
with
ApplyMap(' MapYOM',POLICY_NO) as YEAR_OF_MAKE
to identify the POLICY_NO with missing YEAR....
Yes there is a value
Remove the space before MapYOM
Load *,
ApplyMap(' MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
It looks like there is an extra space in front of the third applymap table name.
ApplyMap(' MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
Try
ApplyMap('MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE
YES you are correct . still the problem exists even after correction suggested by you
Thanks
U are correct. Now working