sql中关于case。。。when CASE (CONVERT(INT,RIGHT(DATEPART(YEAR,GETDATE()),2)) - LEFT(A1.UnifiedDate,2))*52 +DATEPART(WEEK,GETDATE()) - RIGHT(A1.UnifiedDate,2) AS Weeks WHEN WEEKS >52 THEN ‘大於一年’ END 求正确写法 [最优解释] CASE WHEN (CONVERT(INT,RIGHT(DATEPART(YEAR,GETDATE()),2)) - LEFT(A1.UnifiedDate,2))*52 +DATEPART(WEEK,GETDATE()) - RIGHT(A1.UnifiedDate,2) >52 THEN ‘大於一年’ END [其他解释]