嗨任何一個可以給我解釋一下什麼毛病我查詢SQL Server查詢語法問題
SELECT
cDispatcherName AS Name,
cCallNature AS EmergencyCall,
COUNT(cCallNature) AS Total,
(
SELECT
COUNT(cCallNature)
FROM CallInfo
WHERE (cCallNature ='Regular call')
GROUP BY cCallNature
) AS Expr1
FROM CallInfo
WHERE (cCallNature = 'Emergency call')
GROUP BY cDispatcherName, cCallNature
給出了這樣的錯誤消息:
Errormsg::There was an error parsing the query. [ Token line number = 1,Token line offset = 93,Token in error = SELECT ]
您是否收到任何錯誤消息? –
似乎有效的語法。問題是什麼? –
Yes.My querySELECT cDispatcherName AS Name,cCallNature AS EmergencyCall,COUNT(cCallNature)AS Total,(SELECT COUNT(cCallNature)FROM CallInfo WHERE cCallNature ='Regular call'GROUP BY cCallNature from Callinfo)AS Expr1 FROM CallInfo WHERE(cCallNature ='緊急呼叫')GROUP BY cDispatcherName,cCallNature Errormsg ::解析查詢時出錯。 [令牌行號= 1,令牌行偏移= 93,令牌出錯= SELECT]我正在處理Sqlserverce Compactedtion – Ram