hi list,
i’m using the oci adapter to talk to Oracle 9i on Win XP Pro, ruby
185-21, rails 1.2.1
my controller has this code (simplified for testing):
sql = “SELECT * FROM reviews WHERE ((created_at between ‘06feb07’
and ‘07feb07’))”
@reviews = Review.find_by_sql(sql)
logger.debug(“controller found #{@reviews.length} reviews”)
the log output is such:
[4;35;1mReview Load (0.030000) [0m [0mSELECT * FROM reviews WHERE
((created_at between ‘06feb07’ and ‘07feb07’))
controller found 0 reviews
the problem is that if i cut/paste that SQL statement into TOAD, i get
the six rows I expect to match. running it through rails is returning
zero results.
what’s going wrong here?