COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Ricky@MDPD on 10 Sep 2008 12:42:18 AM

Title: date functions and reports based on user defined SQL
Post by: Ricky@MDPD on 10 Sep 2008 12:42:18 AM
Is there any known compatibility issues with using some date functions in a report that is based on a used defined SQL (cognos 8.3). My report queries an oracle database (10G)works fines when i'm not using a date finction, but when I add the follwing filter
-----------------------------------------------
[Main Query].[INCIDENT_DATE] between
to_date( '01-JAN-'||substr(?compl month?,1,4))
And
to_date( ?compl month?, 'yyyy/mm' )-----------------------------------------------------
I get the following error msg:

-----------------------------------------------
GEN-ERR-0015
Initially, in data source type(s) 'OR', the function 'ces_currentmeasure' is not supported in 'RelationalQueryProvider'. After decomposition, in data source type(s) 'PC', the function 'fn:to_date' is not supported in 'OlapQueryProvider'.-------------------------------------------------------

Title: Re: date functions and reports based on user defined SQL
Post by: m23 on 10 Sep 2008 10:22:42 PM
That filter works fine for me. some suggestions ..

Check that the oracle function set is available for use in your package. You can do this by dbl clicking the filter. Click the little F(x) box. open the vendor specific functions folder. You should see oracle in there.

You could apply the filter directly in your sql satement. Just add the following to your sql statement

and incident_date between
to_date( '01-JAN-'||substr(#prompt('compl month')#,1,4))
And  to_date( #prompt('compl month')#, 'yyyy/mm' )