类似下面这样处理,与日期比较部分你自己处理一下即可:
select
*
from
表
order by
(case when time<'11-20' then 1 else 2 end) asc,
(case when time<'11-20' then time else '' end) desc,
(case when time>'11-20' then time else '' end) asc
select
*
from
表
order by
(case when time<'11-20' then 1 else 2 end) asc,
(case when time<'11-20' then time else '' end) desc,
(case when time>'11-20' then time else '' end) asc
select * from tablename
order by case when time<'2007-11-20' then 0 else 1 end,
abs(datediff(second,time,'2007-11-20'))
order by case when time<getdate() then 0 else 1 end,
abs(datediff(second,time,getdate()))