Hello All,
I have a SP which copies records from a table to the same table with new ItemID where old ItemID matches from the parameter passed. The code enters records in serveral tables.
When multiple records are inserted from TableA to TableA for ItemID = 2 where ItemID = 1, (table A has Identity column) I need to capture each identity values in a varible = @@Identity. Currently it just stores the last @@identity.
How should I get every identity values since I have to enter recods in another table for each identity value.
Thanks,