|
|
|
select top 165 *, a.idx as idx1, e.idx as idx2, a.Col002 as Title, b.route as Route2, (select top 1 f.DateValue from v_itin_date as f where a.idx = f.idx and f.DateValue >= '261201' order by f.DateValue asc) as datevalue from v_itin as a inner join Lines as e on a.Col003 = e.LinesCode and a.Col004 = e.BoatCode inner join v_region as b on a.Col005 = b.idx left outer join Route as c on c.Code = b.idx and c.type = 'route' where e.inUse = 'Y' and a.idx in (select DISTINCT idx from v_itin_date where DateValue >= '261201') Order by a.idx
|
|