Cognos Framework Manager 10.2 SQL查询

时间:2015-03-18 15:02:01

标签: sql cognos

我有这个查询插入FM:

and  (year(pm.CREATE_TIMESTAMP) * 100) + month(pm.create_timestamp) <= (year(current_timestamp - 1 months) * 100) + month(current_timestamp - 1 months)

遇到以下错误:

XQE-V5-0001 V5 syntax error(s) found:
Encountered "months" at line 45, column 104.
Was expecting one of:
"/*+" ...
"=" ...
")" ...

在将SQL查询插入查询主题定义时,是否有人遇到类似的问题?

1 个答案:

答案 0 :(得分:0)

year(current_timestamp - 1 months)

不是有效的表达式。使用功能

add_months ( date_expression , integer_expression ) 

代替