COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: AnthonyJ on 16 Feb 2010 04:46:09 PM

Title: Function 'fn:trunc' is not supported in 'RelationalQueryProvider'
Post by: AnthonyJ on 16 Feb 2010 04:46:09 PM
Using Composite 5.1 as datasource, underlying database is Oracle 10g.

I used the oracle function trunc as below and got the following error

trunc([Oasis Adhoc].[DIM_PORTFOLIO].[EFF_FROM_DATE])

GEN-ERR-0009 Data source type(s) 'CS' - Function 'fn:trunc' is not supported in 'RelationalQueryProvider'.

Not sure how to rectify this problem.

Any help is appreciated.

Thanks.
Title: Re: Function 'fn:trunc' is not supported in 'RelationalQueryProvider'
Post by: MFGF on 23 Feb 2010 06:47:48 AM
Hi,

Trunc() is an Oracle-specific function, and C8 is not connecting directly to an Oracle database - it is connecting to Composite via ODBC, so the function is not valid in this context.  You could either do the Trunc() within Composite, or else use a Cognos function in your report to achieve the same result.  I'm not sure what result you are expecting to receive as you have not specified what format to return the date in.  Let us know what you are trying to achieve, and we may be able to suggest alternatives.

MF.