Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

irmantas
New Contributor II

Problems with Applymap

Hi folks,

I am using applymap first time, and stuck on itSmiley Happy

I have this script:

Map_Nesiusti:

Mapping LOAD [Kliento kodas] as ACCOUNTNUM,

     Nesiusti

    

FROM

(ooxml, embedded labels, table is Nesiusti);

ODBC CONNECT TO ax_dw;

SQL SELECT ACCOUNTNUM,

    APPLYMAP('Map_Nesiusti',ACCOUNTNUM) as Nesiusti,

    CREDITMAX,

    CUSTGROUP,

    PHONE

FROM "Litagra_DW".dbo."JG_V_CUSTTABLE";

AND have load error:

SQL##f - SqlState: 37000, ErrorCode: 195, ErrorMsg: [Microsoft][ODBC SQL Server Driver][SQL Server]'APPLYMAP' is not a recognized built-in function name.

SQL SELECT ACCOUNTNUM,

    APPLYMAP('Map_Nesiusti',ACCOUNTNUM)as Nesiusti,

    CREDITMAX,

    CUSTGROUP,

    PHONE

FROM "Litagra_DW".dbo."JG_V_CUSTTABLE"

Whats wrong? Please help on it.

Tags (1)
1 Solution

Accepted Solutions
shraddha_g
Honored Contributor III

Re: Problems with Applymap

ODBC CONNECT TO ax_dw;

Try Below:

Load *,

  APPLYMAP('Map_Nesiusti',ACCOUNTNUM) as Nesiusti

;

SQL SELECT ACCOUNTNUM,

 

    CREDITMAX,

    CUSTGROUP,

    PHONE

FROM "Litagra_DW".dbo."JG_V_CUSTTABLE";

4 Replies
shraddha_g
Honored Contributor III

Re: Problems with Applymap

ODBC CONNECT TO ax_dw;

Try Below:

Load *,

  APPLYMAP('Map_Nesiusti',ACCOUNTNUM) as Nesiusti

;

SQL SELECT ACCOUNTNUM,

 

    CREDITMAX,

    CUSTGROUP,

    PHONE

FROM "Litagra_DW".dbo."JG_V_CUSTTABLE";

MVP
MVP

Re: Problems with Applymap

Applymap() is a qlik function and you can't use that under sql select. Try using it under load statement instead like:

Load

      *,

    APPLYMAP('Map_Nesiusti',ACCOUNTNUM) as Nesiusti

;

SQL SELECT

     ACCOUNTNUM,

     CREDITMAX,

    CUSTGROUP,

    PHONE

FROM "Litagra_DW".dbo."JG_V_CUSTTABLE";

antoniotiman
Honored Contributor III

Re: Problems with Applymap

LOAD *,APPLYMAP('Map_Nesiusti',ACCOUNTNUM) as Nesiusti;

SQL SELECT ACCOUNTNUM,

   APPLYMAP('Map_Nesiusti',ACCOUNTNUM) as Nesiusti,

    CREDITMAX,

    CUSTGROUP,

    PHONE

FROM "Litagra_DW".dbo."JG_V_CUSTTABLE";

irmantas
New Contributor II

Re: Problems with Applymap

Thank you ALL. It works nowSmiley Happy

Community Browser