sort case when

case when inq.urgent_flag=1 and urgeCount=2 then @sort:=99
            when inq.urgent_flag=1 and urgeCount=1 then @sort:=97
            when inq.urgent_flag=1 and urgeCount=0 then @sort:=95
            when inq.urgent_flag=0 and urgeCount=2 then @sort:=93
            when inq.urgent_flag=0 and urgeCount=1 then @sort:=91
            else @sort:=87 end as sort

  ORDER BY res.sort 

 

posted @ 2022-09-30 15:56  八英里  阅读(12)  评论(0编辑  收藏  举报