I'm connecting to ORACLE data for SSRS purposes, using Microsoft Business Intelligence Development Studio.

I need to return data where a date is less than 15 days from today. I've tried the sql that works in ORACLE:

<= to_char(sysdate, ‘yyyymmdd’)-15

but it doesn't work in BIDS - when I move away from the filter field quotes are applied to turn the whole function into a string.

If someone can let me know the correct syntax it would be a real help.

Thanks Neil

有帮助吗?

解决方案

Try this:

to_char(trunc(sysdate)-15, ‘yyyymmdd’)

Trunc will remove the time part from your system timestamp.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top