Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi folks,
I am using applymap first time, and stuck on it:)
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.
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";
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";
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";
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";
Thank you ALL. It works now:)