why do you need a loop here? you may be better off applying set based solution like
--Declare all variables
Declare @RecId as integer, @IssueNum as integer, @Count int;
Create table #TempIssue (IssueId int);
--Insert the temp variables into a table
Insert #TempIssue (IssueId)
SELECT value FROM dbo.ParmsToList(@IssueId, ',')
--Insert into the transfer Database
Insert Drat_Reissue (intIssuedID, intReIssueby, intReIssueTo, dtIssue)
SELECT IssueId, @IssuedBy, @IssueTo, GETDATE())
FROM #TempIssue
--Mark records with Transfer IN effect
Update di
set bitTransfer = 1
FROM Drat_Issued di
INNER JOIN #TempIssue t
ON t.IssueID = di.intIssuedId
Update dr
set intTransTypeId = 6
FROM Drat_Received dr
inner join Drat_Issued di
ON di.intRecId = dr.intRecId
INNER JOIN #TempIssue t
ON t.IssueID = di.intIssuedId
--Insert transaction that product was ReIssued to someone other than receipt Holder
Insert Drat_Transactions (intTransTypeId, intRecId, dtTransaction, intTransactionBy, intTransactionFrom)
SELECT 6, di.intRecId , getdate(), @IssuedBy, @IssueTo
FROM Drat_Issued di
INNER JOIN #TempIssue t
ON t.IssueID = di.intIssuedId
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/