旬报的sql如何写
(case when (datepart(day,signDate)<=10) then '上旬'
when (datepart(day,signDate)<=20 and (datepart(day,signDate)>=11) ) then '中旬'
else '下旬'
end)'时间段'
你把 signDate 替换成你的日期字段就可以