IBM Support

Unable to use CAST function when using ODBC to connect to Access database or Excel file

Troubleshooting


Problem

When using the cast function in a datasource, the following error is thrown: [Microsoft][ODBC Excel Driver]Syntax error (missing operator) in query expression 'cast(MTD as integer)'. The same code works without error in SQL Server Analyzer.

Symptom

[Microsoft][ODBC Excel Driver]Syntax error (missing operator) in query expression 'cast(MTD as integer)'

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Data Manager","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.3;8.4","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}},{"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"}}]

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

More support for:
Cognos Business Intelligence

Software version:
8.3, 8.4

Operating system(s):
Windows

Document number:
386169

Modified date:
08 May 2025

UID

swg21367091

Manage My Notification Subscriptions