You could use placeholders in your SQL statement. This way you will need to do the preparing once and pass the new dates to the execute.
You will need to compute the dates for which the procedure should run, and pass those values in the format that is expected by the SP.
# compute the dates into array @dates #execute stored procedure my $sp = $msdbh->prepare(qq|usp_Dashboard_CallType \@start = ?|); foreach my $cur_date(@dates) { $sp->execute($cur_date) or die("$sp->errstr"); }
In reply to Re: DBI::ODBC Stored Procedure execution
by olus
in thread DBI::ODBC Stored Procedure execution
by hallikpapa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |