SQL SSRS 2008 DateTime Calendar Control and Oracle 10g Data Source
923619Mar 13 2012 — edited Mar 13 2012Hello. I am creating reports in SSRS 2008 using the calendar control for a date range. Let's say we select a start date of 3/3/2012. This parameter is sent into my SQL statement in the WHERE clause which is executed against an Oracle 10g database. All syntax has to be in SQL that Oracle understands, so no CONVERT or CAST.
The format of the date is throwing an error "ORA-01843: not a valid month" when I try to use the following:
SELECT *
FROM TABLE
WHERE STARTDATE >= TO_DATE('3/03/2012', 'MM/DD/YYYY')
I get ORA-01722: invalid number when I try the following:
SELECT *
FROM TABLE
WHERE STARTDATE >= >= TO_CHAR('3/03/2012', 'MM/DD/YYYY')
I cannot find a way to format the date parameter in SQL Server SSRS before it gets to the SQL to be executed in Oracle.
Please help.
Thanks,
Sunny