FR 9840 then FR 4166 at Lisbon
Cologne → Lisbon → Vienna
Timetable, Lisbon time
22:40FR 9840 from Cologne at the gate
17:05FR 4166 to Vienna leaves the gate
18 h 25 apart on the timetable, overnight
FR 4166 leaves 18 h 25 after FR 9840 arrives on the timetable: more than half a day, so not a connection we count.