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
As far as I understand it the issue you are having is that you want to INSERT into Table A, which has an identity column, and you want to preserve the identity from Table B which does not.
In order to do that you should just have to turn on identity insert on table A. This will allow you to define your ID's on insert and as long as they don't conflict, you should be fine. Then you can just do:
Insert into A(identity, fname, lname) SELECT newid, fname, lname FROM B
Not sure what DB you are using but for sql server the command to turn on identity insert would be:
set identity_insert A on