COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: shrini on 11 Aug 2015 03:27:40 AM

Title: Date Prompt in Sql
Post by: shrini on 11 Aug 2015 03:27:40 AM
Hi Team,

I have a problem with date promt implemetation in sql. The sql works fine, but when i use the same sql with report studio the date part is not working,hence it shows all records.

Here is the logic:-

trunc(date) <=TO_DATE ('20150724','YYYYMMDD')   in sql. It works fine

trunc(date)<=TO_DATE(#sq(prompt('Yr', 'Date'))#, 'YYYY-MM-DD')in report studio.

But when i include date prompt in sql with trunc(date)<=TO_DATE(#sq(prompt('Yr', 'Date'))#, 'YYYY-MM-DD'), the report shows all records, instead of the exact records.

Let me know your inputs, to solve this.

Thanks,
Shrini.