You say you need to do this "I need to insert vehicles into the TVHC table and for each vehicle insert trips into TTRV table." but the Insert Into on the outer apply is inserting into TTRP and not TTRV. Which has the typo?