Dunno if this is what you are looking for?BEGIN TRANSACTIONINSERT INTO MyTableA(ACol1, ACol2, ACol3, ACol4, ...)SELECT BCol1, BCol2, CCol3, CCol4, ...FROM MyTableB AS B JOIN MyTableC AS C WHERE C.ID = B.IDIF @@ERROR <> 0 GOTO GotErrorINSERT INTO MyTableD(DCol1, DCol2, DCol3, DCol4, ...)SELECT BCol1, BCol2, CCol3, CCol4, ...FROM MyTableB AS B JOIN MyTableC AS C WHERE C.ID = B.IDIF @@ERROR <> 0 GOTO GotError-- Success!COMMITGOTO DoneGotError:ROLLBACKDone:
Kristen