Question

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

Was it helpful?

Solution

Try this:

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

Trunc will remove the time part from your system timestamp.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top