你能幫我知道什麼可能是我的SQL錯誤? 我有遺漏的表達錯誤,但我找不到錯誤。 非常感謝您提前。SQL錯誤:ORA-00936:缺少表達式
SELECT SYSTEMNAME, round(MAX(GBL_CPU_TOTAL_UTIL),2) AS AVE_CPU,
convert(varchar(20),DATEADD(hour, DATEDIFF(hour, 0, DATETIME), 0),110) AS DATE
FROM dbo.[GLOBAL]
WHERE (SYSTEMNAME IN ('X1','X2','X3'))
AND (DATETIME > DATEADD(month, - 24, GETDATE()))
AND (DATETIME BETWEEN '12-27-2011 00:00' AND '12-30-2011 00:00')
GROUP BY SYSTEMNAME, convert(varchar(20),
DATEADD(hour, DATEDIFF(hour, 0, DATETIME), 0),110)
ORDER BY DATE
錯誤:
ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:
Error at Line: 2 Column: 9
對DATE字段使用引用>按「DATE」排序; – 2013-03-29 14:38:15