IBM Support

Custom SQL with prompt macro generates XQE-DAT-0001 Data source adapter error: org.netezza.error.NzSQLException: ERROR: 702 : Incorrect data type

Troubleshooting


Problem

Report uses Netezza datasource and it contains manual SQL and a prompt macro.

Following SQL works:

SELECT CASE WHEN (EXTRACT (DOW FROM current_date) <> 1) THEN ('Not Monday') ELSE ('Monday') END "Day" FROM <TableName>

However, when sql embedded with Prompt it produces an error:

SELECT CASE WHEN (EXTRACT (DOW FROM #prompt('P_DATE', 'date')# ) <> 1) THEN ('Not Monday') ELSE ('Monday') END "Day" FROM <TableName>

Error generated:
XQE-DAT-0001 Data source adapter error: org.netezza.error.NzSQLException: ERROR:  702 : Incorrect data type

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m500000008d78AAA","label":"Reporting"}],"ARM Case Number":"TS002367430","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Product":{"code":"SS6G84","label":"IBM Cognos Analytics on Cloud"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}},{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
15 January 2026

UID

ibm16985997