Is it possible to have multiple order by clauses in a select statement? Can I do something like this?
SELECT TOP(5) * FROM [Db].[dbo].[Schedules]
where (datepart(hour, [Arrival]) >= datepart(hour, getdate()))
order by abs( (datepart(hour, [Arrival]) - datepart(hour, getdate()))*60 + datepart(minute, [Arrival]) - datepart(minute, getdate()))
order by [Arrival]
Reason I need second order by is to ensure records are returned in increasing Arrival times.
TIA.
Use a comma separated list: