Author Topic: Last number of days feature not creating filter in where clause  (Read 1528 times)

Offline mrl72

  • Full Member
  • ***
  • Join Date: Mar 2014
  • Posts: 17
  • Forum Citizenship: +0/-0
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.

 



       
Twittear