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

How to add number 15 to the processing date column

Started by COGNOSBC, 10 Oct 2012 08:47:30 AM

Previous topic - Next topic

COGNOSBC

Hi,

I am trying to add number 15 to processing date"year", if the date between 1 to 15. below is my logic.

IF(EXTRACT(DAY,[SQL1].[PROCESS_DATE]) BETWEEN 1 AND 15) THEN
(CAST(EXTRACT(YEAR,[SQL1].[PROCESS_DATE]),VARCHAR(10))+15) ELSE
([SQL1].[PROCESS_DATE])

when I ran the report it is throwing following error: RQP-DEF-0177

      An error occurred while performing operation 'sqlScrollBulkFetch' status='-232'.


not sure what is wrong in my code. I really need help on this could you guys please help to correct it.

Database is DB2

pricter

I do not think that is possible to add 15 (number) to a varchar.

What r you trying to achieve?
For example if you have a date 13/10/2012 you want to get 2027 or 13/10/2027?

Furhtermore I am not a db2 expert but in my expirience so far from an if statement you should get same data types in if and else statement. In your situation in if you will get a varchar and in else a date.