Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

apply map

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

BCODPOLICY_NOVEH_TYPEMAKEYEAR_OF_MAKE
AR00AR00121B0000253THREE WHEELERKING

        

1 Solution

Accepted Solutions
Colin-Albert

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

View solution in original post

7 Replies
terezagr
Partner - Creator III
Partner - Creator III

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

maxgro
MVP
MVP


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....

upaliwije
Creator II
Creator II
Author

Yes there is a value

anbu1984
Master III
Master III

Remove the space before MapYOM

Load *,

        ApplyMap(' MapYOM',POLICY_NO, null()) as YEAR_OF_MAKE

Colin-Albert

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

upaliwije
Creator II
Creator II
Author

YES you are correct . still the problem exists even after correction suggested  by you

upaliwije
Creator II
Creator II
Author

Thanks

U are correct. Now working