in reply to Re: MS SQL Stored Procedure Syntax
in thread MS SQL Stored Procedure Syntax

Doubt if this has anything to do with your problem, but I see a couple of other problems.
This is wrong:
$dbh = DBI->connect("dbi:ODBC:CQmaster",$user,$password) || die "Can't + open! $!";
First, $! does not return error messages from DBI, you want $DBI::errstr instead (or RaiseError, see the next note).
Second, you're not checking the status of the prepare and execute statements. You could either check each statement, or use RaiseError on the connect (see the DBI docs).

I doubt that'll magically fix anything, so after that, if the warning still occurs, you can try putting $sth->finish after one or both of the fetch loops, though it seems like it should be unnecessary (maybe it gets confused with a stored procedure?).