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

Parsing Error ... but why? Nothing is wrong...?!

Started by kyleboerner, 06 Aug 2010 04:33:43 PM

Previous topic - Next topic

kyleboerner

I am looking to graph Total Storage Charges for the last 12 months and have created 12 "buckets" labeled Month_1 to Month_12.  Each expression reads as follows:
if ([Billing].[Billing Information].[Billing Month End Date]= cast (_add_days (_first_of_month (current_date), -1), current_timestamp)) then ([Billing].[Billing Information].[Storage Charges]) else (0)

To me this looks flawless.  However, when I run the report, or even running tabular data for the individual query, I receive the following Parsing error:
Parsing error before or near position: 134 of: "if ([Billing].[Billing Information].[Billing Month End Date]= cast (_add_days (_first_of_month (current_date), -1), current_timestamp"

Can anyone help me by shedding some light ie. sharing their COGNOS genius??

Kyle

tupac_rd

AFAIK, I think it should be just timestamp instead of current_timestamp

The following datatypes can be specified for cast function: CHARACTER, VARCHAR,  CHAR, NUMERIC, DECIMAL, INTEGER, SMALLINT, REAL, FLOAT, DATE, TIME, TIMESTAMP, TIME WITH TIME ZONE, TIMESTAMP WITH TIME ZONE, and INTERVAL. When type casting to an INTERVAL type, one of the following interval qualifiers must be specified: YEAR, MONTH, or YEAR TO MONTH for the year-to-month interval datatype; DAY, HOUR, MINUTE, SECOND, DAY TO HOUR, DAY TO MINUTE, DAY TO SECOND, HOUR TO MINUTE, HOUR TO SECOND, or MINUTE TO SECOND for the day-to-second interval datatype. More notes for this function are included in the user guide.