if you want to use the last row inserted ID then you simply do the following tasks
Declare @Request_Code INT
SELECT @Request_Code=Request_Code FROM XURS_UploadRequests WHERE Request_Code = @@IDENTITY
PRINT @Request_Code
See Article
http://www.beansoftware.com/T-SQL-FAQ/Get-Last-Inserted-ID.aspx
No comments:
Post a Comment