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

Last number of days feature not creating filter in where clause

Started by mrl72, 21 May 2014 03:48:53 PM

Previous topic - Next topic

mrl72

When using date filters in a query there is an option to filter on "Last number of days". Has anyone noticed that when it creates the query it doesn't pass the date filter to the database, it applies it using a Cognos function after the data is returned and thus performance is terrible?

The reason being Cognos uses the _add_days function, which is a Cognos function. Example: Transaction_date >= _add_days(current_date,(-(1 * 40))) (last 40 days).  And it simply doesn't add it to the outgoing SQL query.                                     

But what's strange is that it converts the _add_days function to a DB equivalent function as a column in the same SQL, so why isn't it passing it to the where clause in the same SQL? Example: select  "Transaction_date", ( current_date + cast( (   
-40 ) as INTERVAL DAY(4)))

Anyone seen this before?

Cheers.