衣服尺码自定义排序sql
2018年10月15日 13:51:11 42雨林集团军 阅读数 341
转载请注明出处
-
select SizeCup as Size ,OrderQty from
-
VW_CM1_SizeBreakdowm where So_NO =@So_No and so_item=@Item_No
-
order by
-
(case when SizeCup='XXXL' then '0'
-
when SizeCup ='XXS' then '1'
-
when SizeCup ='XS' then '2'
-
when SizeCup='S' then '3'
-
when SizeCup='M' then '4'
-
when SizeCup='L' then '5'
-
when SizeCup='XL' then '6'
-
when SizeCup='XXL' then '7'
-
when SizeCup='XXXL' then '8'
-
--else COMPARE_FLAG
-
end) ASC