my $date_file = new IO::File; $date_file->open("getline); $date_file->close; my $query = q{SELECT Count(x) AS numberOfx, y INTO temp_table FROM Referrals WHERE ((x Is Not Null) AND ([Today's Date]> ?)) GROUP BY x ORDER BY Count(x), y}; $sth = $dbh->prepare($query); $sth->execute($date); $sth->finish(); #### DBD::ODBC::st execute failed: called with 1 bind variables when 0 are needed at C:\Documents and Settings\xxx\Desktop\distribute.pl line 264. #### DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. (SQL-07002)(DBD: st_execute/SQLExecute err=-1) at C:\Doc uments and Settings\xxx\Desktop\distribute.pl line 264.