문제

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