Skip to Content
Former Member
Oct 05, 2009 at 06:22 PM

SQL command date parameters breaking SQL code



I have an SQL statement that executes without error against Oracle 10g. I've created a command in Crystal Reports 2008 for it. It uses a date range. When I parametrize the date range, and select 'Date' as my value type for the parameter, it breaks the SQL with the following error:

"Failed to retrieve data from the database.

Details: ORA-00907: missing right parenthesis

[Database Vendor Code: 907]"

Here is a sample SQL statement that breaks:


FROM gift g

WHERE g.gift_date_of_record BETWEEN to_date ('{?GiftDateStart}', 'mm/dd/yyyy')

AND to_date ('{?GiftDateEnd}', 'mm/dd/yyyy')

Has anyone else experienced this problem or know a work-around?

Thanks in advance!