IBM Support

UDA-QOS-0006 UDA-SQL-0115 Inappropriate SQL request, when running upgraded report

Troubleshooting


Problem

When upgrading from previous release of IBM Cognos, some report cannot execute, and display error: "UDA-QOS-0006 Error Details: UDA-SQL-0115 Inappropriate SQL request. UDA-SQL-0564 [Microsoft SQL Server Native Client 10.0]Deferred prepare could not be completed. UDA- SQL-0564 [Microsoft SQL Server Native Client 10.0]Statement(s) could not be prepared. (SQLSTATE=42000, SQLERRORCODE=8180) UDA-SQL-0564 [Microsoft SQL Server Native Client 10.0]Incorrect syntax near ')'."

Symptom

Unable to run upgraded report

Cause

Changes to Function Mapping in IBM Cognos has tighter data type requirements. Functions such as _last_of_month require either a DATE or TIMESTAMP.

Resolving The Problem

Take the example filter:
[Date] = _last_of_month(_first_of_month(current_date)-1)

Would produce an UNKNOWN datatype, as it is DATE minus INTEGER. Modifying this filter to use the IBM Cognos Constant of "- 1 day" will resolve the issue.

The filter would then appear as:

[Date] = _last_of_month(_first_of_month(current_date) - 1 day)

This Constant can be found under Functions tab -> Constants -> Interval day within a Detailed Filter Expression editor

Related Information

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.2;10.1.1;10.1","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21611787