1
我有一个表如下:按促销状态排序(startDate <getDate()<endDate)?
ID Title StartDate EndDate
1 PromoA 2012-06-01 2012-08-01
2 PromoB 2011-01-01 2011-02-01
3 PromoC 2012-09-01 2012-10-01
4 PromoD 2012-07-01 2012-09-01
因此,有4促进与状态:1-OnGoing; 2-OutOfDate; 3-Waiting; 4-OnGoing
如何通过自己的状态对它们进行排序?
是你的工作基于由开始日期排序状态那么enddate?您当前的查询和/或您提供的表的预期结果是什么? – Greg 2012-07-20 04:16:25
我期望结果如下:1-OnGoing; 4-OnGoing; 3-Waiting; 2-OutOfDate – 2012-07-20 06:32:45