Is This Possible?
Here is something I'm looking for, executed together:
First, it would execute the INSERT based on how many rows in the SELECT
INSERT INTO TABLE2 (xID, NAME) SELECT xID, NAME FROM TABLE Then getting the @@IDENTITY of each INSERTED ROW, it would create a new Insert including the same data of the first SELECT statement:
INSERT INTO TABLE3 (xID, NAME, ID) SELECT xID, NAME, ID as Scope_IdentitY() If not, what the best way without using cursor or while?