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 cu
Use the ouput clause from 2005:
DECLARE @output TABLE (id int) Insert into A (fname, lname) OUTPUT inserted.ID INTO @output SELECT fname, lname FROM B select * from @output
now your table variable has the identity values of all the rows you insert.