I have a select statement in Oracle PL/SQL Developer that's retrieving values based on a date:
select * from <table> where to_date(create_date) = to_date('20090506', 'YYYYMMDD')
where create_date
is of Oracle type date. This returns a non-empty set as it should. However, in ActiveRecord:
<Table>.find_by_sql("select * from <table> where to_date(create_date) = to_date('20090506', 'YYYYMMDD')")
returns no rows, which is incorrect. I suspect it has something to do with how ActiveRecord handles Time/Date/DateTime objects.
Any ideas? Thanks