Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL SSRS 2008 DateTime Calendar Control and Oracle 10g Data Source

923619Mar 13 2012 — edited Mar 13 2012
Hello. 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2012
Added on Mar 13 2012
16 comments
3,038 views