sqloracle-databasecognosreport-studio

Cognos UDA-EE-0094 ERROR Operation "greater" is invalid for the following combination of data types


So, in Cognos Report Studio i have a query item with this expression that is getting me an error that i still need to figure out. The expression is this:

IF (( current_date - [Submission date]) > 30) then ('Yes') ELSE ('No')

And the error is this:

UDA-EE-0094 The operation "greater" is invalid for the following combination of data types: "interval2" and "integer"

[Submission date] in the framework level its used as an attribute and in the format is formatted as a date in 'Date Style'


Solution

  • AS i don_'t know if you have native sql enabled and the could use DATEDIFF.

    use the Cognos function _days_between()

    IF (_days_between(( current_date, [Submission date]) > 30) then ('Yes') ELSE ('No')