select top 7 tgbs as bs,tgbt as bt from tgsp where status = 1 and tjxh != null and tjxh !=0 order by case when tjxh is not null then 0 else 1 end, tjxh
order by case when tjxh is null then 1 else 0 end,tjxh
select top 7 tgbs as bs,tgbt as bt from tgsp where status = 1 and tjxh IS NOT null and tjxh !=0 order by case when tjxh is not null then 0 else 1 end, tjxh
order by case when tjxh is null then 1 else 0 end,tjxh
select top 7 tgbs as bs,tgbt as bt from tgsp where status = 1 order by case when tjxh is null then 1 when tjxh=0 then 1 else 0 end
select top 7 tgbs as bs,tgbt as bt from tgsp where status = 1
order by case when tjxh is null then 1 when tjxh=0 then 1 else 0 end