保留错误(-3304);此错误没有消息 - 访问SQL

时间:2015-07-17 16:22:39

标签: sql ms-access-2010

我正在为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;

0 个答案:

没有答案