SELECT v.[Vehicle-Code], v.[VEHICLE-KM], ( SELECT MIN(s.[VEHICLE-SCHEDULE-FOR-REVISIT]) FROM [Vehicle-Schedule] s WHERE s.[VEHICLE-SCHEDULE-FOR-REVISIT] > v.[VEHICLE-KM] ) AS [VEHICLE-SCHEDULE-FOR-REVISIT] FROM Vehicle v
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)