#execute stored procedure my $sp = $msdbh->prepare(qq|usp_Dashboard_CallType \@start = 20080101|); $sp->execute or die("$sp->errstr"); #### DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type int to datetime. #### my $sp = $msdbh->prepare(qq|usp_Dashboard_CallType \@start = $next_date|);