我正在为Access 2010数据库编写SQL查询。当我尝试运行它时,会出现此错误:
Reserved error (-3304); there is no message for this error.
导致此错误的原因是什么?
我的SQL:
SELECT [Cams TNEP FINAL].[Date Entered]
,[Cam Issues].Department
,[Cam Issues].Equipment
,[Cam Issues].[Operation Issues]
,Sum([Cam Issues].Downtime) AS SumOfDowntime
,IIf([Cam Crew] = '3', 'C-Crew', IIf([Cam Crew] = '2', 'B-Crew', 'A-Crew')) AS Crew
FROM [Cams TNEP FINAL]
INNER JOIN [Cam Issues] ON [Cams TNEP FINAL].[Cam ID] = [Cam Issues].[Cam ID]
GROUP BY [Cams TNEP FINAL].[Date Entered]
,[Cam Issues].Department
,[Cam Issues].Equipment
,[Cam Issues].[Operation Issues]
,IIf([Cam Crew] = '3', 'C-Crew', IIf([Cam Crew] = '2', 'B-Crew', 'A-Crew'))
HAVING (
(
([Cams TNEP FINAL].[Date Entered]) >= #8 / 1 / 2014 #
AND ([Cams TNEP FINAL].[Date Entered]) <= #8 / 1 / 2014 #
)
AND (
([Cam Issues].Department) IN (
'9230-R'
,'9230-F'
)
)
AND ((IIf([Cam Crew] = '3', 'C-Crew', IIf([Cam Crew] = '2', 'B-Crew', 'A-Crew'))) LIKE IIf('ALL' = 'all', '*-Crew', 'ALL'))
)
ORDER BY [Cam Issues].Department
,[Cam Issues].Equipment;