If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Function 'CURRENTDATE()' does not exist

Started by aymancherif, 20 Oct 2013 11:12:32 AM

Previous topic - Next topic

aymancherif

Hello Dears,

I have upgraded my database from DB2 to Netezza and all the changes has been done to make the reports looking over the new Netezza package successfully.

The problem is that there is a report that was working fine before upgrading to Netezza and now it gives me an error.

The case is that I'm using a filter to get the data of the current year so the code inside the filter is as follows:

chr( [PRESENTATION_LAYER].[TIME_DIM].[YEAR_NUM].[YEAR_NUM]) = CHR(extract(year,current_date))

when I validate it no errors return, but when I run the report the following error appears:

  Data source adapter error: org.netezza.error.NzSQLException: ERROR: Function 'CURRENTDATE()' does not exist Unable to identify a function that satisfies the given argument types You may need to add explicit typecasts - when processing query: SELECT "TIME_DIM"."YEAR_NUM" AS "column0", "TIME_DIM"."YEAR_NAME" AS "column1", "TIME_DIM"."Q_NUM" AS "column2", "TIME_DIM"."Q_NAME_AR" AS "column3", "TIME_DIM"."MONTH_NUM" AS "column4", "TIME_DIM"."MONTH_NAME_AR" AS "column5" FROM "ENPOBI"."ENPOADMIN"."TIME_DIM" "TIME_DIM" WHERE chr("TIME_DIM"."YEAR_NUM") = CHR(EXTRACT(YEAR FROM CurrentDate())) GROUP BY "TIME_DIM"."YEAR_NUM", "TIME_DIM"."YEAR_NAME", "TIME_DIM"."Q_NUM", "TIME_DIM"."Q_NAME_AR", "TIME_DIM"."MONTH_NUM", "TIME_DIM"."MONTH_NAME_AR" ORDER BY "column0" ASC NULLS LAST, "column1" ASC NULLS LAST, "column2" ASC NULLS LAST, "column3" ASC NULLS LAST, "column4" ASC NULLS LAST, "column5" ASC NULLS LAST

Please anybody can help on this.

Thanks,
Ayman

MFGF

Hi,

You appear to be using a mixture of database and Cognos functions in the same expression. I'd try to avoid this if possible. The CHR function appears to be DB2-specific - it returns the ASCII character corresponding to a given number. Is this really your intent? Try removing the CHR function from the expression - does this fix the issue?

Cheers!

MF.
Meep!