in reply to Problem passing date to SQL

You should either use a TO_DATE() function in your sql, or set the nls date/timestamp format(s), e.g.:
... WHERE date_column = TO_DATE(?, 'YYYY-MM-DD') ... my $date_str = '2015-08-08'; $sth->execute($date_str); # OR my $date_fmt = my $datetime_fmt = my $datetime_tz_fmt = 'YYYY-MM-DD HH +24:MI:SS'; $dbh->do("alter session set nls_date_format=$date_fmt"); $dbh->do("alter session set nls_timestamp_format=$datetime_fmt"); $dbh->do("alter session set nls_timestamp_tz_format=$datetime_tz_fmt") +; ... WHERE date_column = ? ... my $date_str = '2015-08-08'; $sth->execute($date_str);
Update: Oh, and I agree w/below about doing a LIKE against a date (although it CAN work in Oracle, it is incredibly bad practice). It should be, e.g.:
$start_date = '2015-08-01'; $end_date = '2015-09-01'; ... WHERE date_column >= ? and date_column < ? ... $sth->execute($start_date, $end_date);
Update: Fixed date fmt. Twice.