为什么我在查询中收到指定表达式的错误?
Why am I getting an error for specified expression in a Query?
我不断收到以下错误:
Your query does not include the specified expression '[Employees}.{Last Name] & "," & [First Name]' as part of an aggregate function.
这是 SQL 视图:
SELECT [Employees].[Last Name] & ", " & [First Name] AS EmployeeName,
Sum(IIf([Vacation Calendar].[TypeID]=1,[Vacation Calendar].[Time],0)) AS SumOfSickTime
FROM Employees
INNER
JOIN [Vacation Calendar]
ON Employees.ID = [Vacation Calendar].EmployeeID
WHERE (((Employees.[Active Employee])=True))
ORDER
BY [Employees].[Last Name] & ", " & [First Name];
您正在使用 SUM,因此需要在查询末尾包含 GROUP BY 函数。
类似 GROUP BY [Employees].[Last Name] & ", " & [First Name]
使用 ORDER BY 无法解决此问题
我不断收到以下错误:
Your query does not include the specified expression '[Employees}.{Last Name] & "," & [First Name]' as part of an aggregate function.
这是 SQL 视图:
SELECT [Employees].[Last Name] & ", " & [First Name] AS EmployeeName,
Sum(IIf([Vacation Calendar].[TypeID]=1,[Vacation Calendar].[Time],0)) AS SumOfSickTime
FROM Employees
INNER
JOIN [Vacation Calendar]
ON Employees.ID = [Vacation Calendar].EmployeeID
WHERE (((Employees.[Active Employee])=True))
ORDER
BY [Employees].[Last Name] & ", " & [First Name];
您正在使用 SUM,因此需要在查询末尾包含 GROUP BY 函数。
类似 GROUP BY [Employees].[Last Name] & ", " & [First Name] 使用 ORDER BY 无法解决此问题