Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am getting the error message in Netezza as below when i try to use the applymap function.
Can someone help me resolve this issue.
Netezza Performance server
Applymap(unknown, int8)does not exist.
You need to add explicit typecasts.
Regards,
Nazira
I don't know Netezza and assume it's some kind of database which you queries from qlikview per SQL Select statement. Within such a Select statement you could only use those function which the database and the (odbc/oledb) driver provides. A qv function like applymap() will therefore fail. For this topic you need a preceeding Load, like:
table:
Load *, applymap('map', value, alternative value) as NewField;
SQL Select * From YourDatabase;
- Marcus
Hello Marcus,
Thanks for the input.
I will try and let you know the outcome.
Nazira
This is the correct answer..
Thank you
Hello Marcus,
Thank You.
That was the correct answer.
Kindly explain why do we have to put in load statement?
Also, the exact difference between a load statement and a select statement?
Regards,
Nazira
On Mon, Apr 27, 2015 at 2:17 PM, Marcus Sommer <qcwebmaster@qlikview.com>
Hi Nazira,
Please mark the correct answer.
Statement SELECT is used only when you retrieve data from a database. The syntax of the select statements is defined by the database SQL. It does not understand QlikView syntax, that's why you got the error.
Statement LOAD is for any other data load. It is using QlikView syntax, including applymap().
Preceding load is a structure like this:
LOAD
A,B,C
;
SELECT
A,B,C
FROM SomeTable;
You use SQL syntax in the SELECT part, and QV syntax in the LOAD part which is loading directly from the SELECT results.
A very good explanation is here: Preceding Load.
- Marcus
Hello Marcus,
Now by replacing lookup instead of applymap, i am not getting any error but the field names are not getting displayed.
Now, what can be the issue?
Department:
Load Dept_key, Dept_nm as "Dept Name";
Sql select Dept_key, UPPER(Dept_nm) as "Dept_nm"
from cdw.department;
UrgentCare:
Load Acct_Key, Dept_key,
lookup('[Dept Name]','Dept_key', 'Dept_key','Department')as 'Dept_3_4'
from cdw.urgentCare;
It should be rather look so:
UrgentCare:
Load Acct_Key, Dept_key, lookup('[Dept Name]','Dept_key', 'Dept_key','Department') as 'Dept_3_4';
SQL Select * from cdw.urgentCare;
- Marcus