I'm inserting multiple records into a table A from another table B. Is there a way to get the identity value of table A record and update table b record with out doing a cursor?
Create Table A (id int identity, Fname nvarchar(50), Lname nvarchar(50))
Create Table B (Fname nvarchar(50), Lname nvarchar(50), NewId int)
Insert into A(fname, lname) SELECT fname, lname FROM B
I'm using MS SQL Server 2005.
Thanks