title: How to insert multiple records and get the identity value?
body: <p>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?</p>
  
  <pre><code>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
  </code></pre>
  
  <p>I'm using MS SQL Server 2005.</p>