mqni
作者mqni·2014-02-14 18:24
商业智能工程师·IBM

IQD 语法错误DMS-E-SS_SYNTAX, A syntax error was detected near 'XXX'.

字数 1893阅读 2856评论 0赞 0
背景介绍:
1、IQD文件作为Transformer的数据源,自己手工编写IQD文件的SQL语句。
2、能确定与SQL SERVER数据源的连接正常。
3、Transformer引用了多个IQD,某个IQD文件在编辑之后使用Transformer的Data Source Viewer功能报语法错误,但该段sql语句是在SQL Server验证运行通过的。
        下图为报错信息:(截图跟标题略有出入,属不断编辑调整sql再测试的结果)
        开始的思路是以为要把SQL SERVER的语法转化为Cognos能够识别的语法,花了不少精力去了解怎么编写Cognos Sql,但显然是走错了方向。另外上图显示的报错代码TR1907是个比较泛的方向,容易迷失。不卖关子,直接上最终的问题定位:
--------------------------------------------------------------------------------------------------------------------------------
TR0118 - Manually created IQD generates a syntax error
Technote (troubleshooting)

Problem(Abstract)

A manually created IQD file is not accepted by Transformer, which throws a syntax error whereas the SQL statement is correct and works fine through the database client tool.

Symptom

TR0118 Transformer can't read the database <...> defined in <...>.
DMS-E-GENERAL, A general exception has occurred during operation 'prepare request with options'.
DMS-E-SS_SYNTAX, A syntax error was detected near '<...>'

Cause

The Cognos UDA layer tries to interpret the SELECT order as if it was generated by Impromptu or Framework Manager, but the SQL statement contains a specific database function or syntax that is not recognized.

Resolving the problem

Inform the UDA layer that the request should be sent directly to the database by enclosing the whole statement into brackets {}

Steps:- Open the IQD file in a text editor
- Enclose the SQL statement into brackets like this :
...
BEGIN SQL
{SELECT ...
FROM ...
WHERE ...}
END SQL
...
- Save the IQD

Historical Number

1031787

--------------------------------------------------------------------------------------------------------------------------------

附原文链接已失效:http://www-01.ibm.com/support/docview.wss?uid=swg21370906 

我是通过google的网页快照才有机会看到上面的解决方法:本地SQL外套个{}即可。

如此简单的解决方法,我只能感慨下没文化真可怕,亦或是大道至简?想想自己连基本的IQD文件编辑常识都知道不多,活该遇到这种问题都得花大量时间折腾。


如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广