I don't see any errors in your Perl code (other than using $dbh->errstr when you should be using $sth->errstr which should not impact your problem). You are binding columns correctly. Either you don't have your SQL right, or your data is not what you think it is.