SELECT CASE (pmod(datediff(f0.`4168388__c_0`,’1970-01-04′),7)+1) WHEN ‘1’ THEN ‘星期日’ WHEN ‘2’ THEN ‘星期一’ WHEN ‘3’ THEN ‘星期二’ WHEN ‘4’ THEN ‘星期三’ WHEN ‘5’ THEN ‘星期四’ WHEN ‘6’ THEN ‘星期五’ WHEN ‘7’ THEN ‘星期六’ ELSE ‘星期六’ END AS d_4168393 FROM rr f0 ORDER BY d_4168393
2.0.1 中 case 后面不能直接跟 ( ,如果改成
SELECT CASE pmod(datediff(f0.`4168388__c_0`,’1970-01-04′),7)+1 WHEN ‘1’ THEN ‘星期日’ WHEN ‘2’ THEN ‘星期一’ WHEN ‘3’ THEN ‘星期二’ WHEN ‘4’ THEN ‘星期三’ WHEN ‘5’ THEN ‘星期四’ WHEN ‘6’ THEN ‘星期五’ WHEN ‘7’ THEN ‘星期六’ ELSE ‘星期六’ END AS d_4168393 FROM user_96300_14776217442944168389 f0 ORDER BY d_4168393
则可以运行
在1.5.2中则不存在此问题
原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/195498.html