This is probably easy but I can't work it out. I have this statement
SELECT DISTINCT TOP 100 PERCENT dbo.CIF_PlaceRe ference.Name
FROM dbo.CIF_Departu res INNER JOIN
dbo.CIF_PlaceRe ference ON dbo.CIF_Departu res.EndPoint
= dbo.CIF_PlaceRe ference.PlaceID
ORDER BY dbo.CIF_PlaceRe ference.Name
This results in a column of placenames which is OK. There are also multiple
'time of day' values against each placename however I only want to return
the one nearest to the current time. If I do this...
SELECT DISTINCT TOP 100 PERCENT
dbo.CIF_PlaceRe ference.Name,db o.CIF_Departure s.StartTime
FROM dbo.CIF_Departu res INNER JOIN
dbo.CIF_PlaceRe ference ON dbo.CIF_Departu res.EndPoint
= dbo.CIF_PlaceRe ference.PlaceID
ORDER BY dbo.CIF_PlaceRe ference.Name
.... I get multiple place names.
Any ideas?
SELECT DISTINCT TOP 100 PERCENT dbo.CIF_PlaceRe ference.Name
FROM dbo.CIF_Departu res INNER JOIN
dbo.CIF_PlaceRe ference ON dbo.CIF_Departu res.EndPoint
= dbo.CIF_PlaceRe ference.PlaceID
ORDER BY dbo.CIF_PlaceRe ference.Name
This results in a column of placenames which is OK. There are also multiple
'time of day' values against each placename however I only want to return
the one nearest to the current time. If I do this...
SELECT DISTINCT TOP 100 PERCENT
dbo.CIF_PlaceRe ference.Name,db o.CIF_Departure s.StartTime
FROM dbo.CIF_Departu res INNER JOIN
dbo.CIF_PlaceRe ference ON dbo.CIF_Departu res.EndPoint
= dbo.CIF_PlaceRe ference.PlaceID
ORDER BY dbo.CIF_PlaceRe ference.Name
.... I get multiple place names.
Any ideas?
Comment