• My suggestion would be to create a temp table (including a TempID identity column) of all the data to be inserted/used from TableC

    Insert into TableA from this temp table but with null/empty values (if allowed) to reserve ID values and capture the ID output to another temp table

    Find the lowest ID from that table

    Update TableA from the first temp table joining ID on TempID+(new lowest ID)-1

    Make sure it all happens in one transaction

    Far away is close at hand in the images of elsewhere.
    Anon.