An odd sort by date problem...
Hoping someone can provide me with a quick solution to an odd problem im having. I have the following code that displays records out of a shipping database, it groups boats by their status, then sorts by arrival date in ascending order. The problem is it actually puts the visits for the next month before the visits of the current month... quite odd
any help would be greatly appreciated :D
ORDER BY (CASE t1.VisitStatus when 'Departed Vessel' then 1 when 'At Anchor' then 2 when 'In Port' then 3 else 4 end), ArrivalDate ASC