I have 2 tables (parent/child relationship). The parent table has an identity key that is automatically generated upon inserting a record. The identity key is also the primary key. I am performing a batch insert from a raw data table (lots of records) into the parent table, but need to be able to individually grab the identity key value of each newly inserted record and insert that value into the child table along with some other data. I am assuming that this will require a nested insert statement (i.e. Insert first record from raw data table into parent table, grab identity key from parent table, insert identity key and other data into child table, move to next record in raw data table). Could someone please help me with the syntax on a nested insert statement? Better yet, am I approaching this problem the correct way? Thanks for any help.