• Look at using the OUTPUT clause when inserting the parent records to capture the information you need to insert the child records.

    Hard to give more with so little information to work with here.