Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

looks like @@rowcount issue ?

$
0
0

I have a dynamic query like :

SET @strSQL =    
' UPDATE ' + LTRIM(@tblName) + '
 SET Amount= ISNULL(Amount,0) + ' + CAST(ISNULL(@@dAmount,0) AS CHAR(50)) + ',
ChangeDate =  GETDATE()  
 WHERE PlayerID= ' + STR(@@nPlayerID) 

EXEC(@strSQL)

SELECT @iError = @@ERROR, @iRowCount = @@RowCount

Is there any chance @iRowCount could be '0' even the record got updated in @tblName table ?

Note : This code is executed from multiple clients at a time .

thanks,



 

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>