自动生成的代码会引发语法错误

时间:2015-10-16 09:23:45

标签: sql ms-access syntax ms-access-2010

我的问题是自动生成的SQL代码会引发语法错误。虽然它似乎运行正常,但每次点击该列时我都会看到语法错误消息,这可能令人不安。

代码是:

SELECT
   Daily_Output20151013.[Hinmei/Hinsyu],
   [Defect Detail Information List].[Find Process Name],
   Sum(Daily_Output20151013.[Outgoing Qty]) AS [SumOfOutgoing Qty],
   Sum([Defect Detail Information List].[Defect Qty]) AS [SumOfDefect Qty],
   Sum([Defect Detail Information List].[Modify Qty]) AS [SumOfModify Qty],
   IIf([Hinmei/Hinsyu]="Unit SD143S" Or [Hinmei/Hinsyu]="Unit SD111S","HP",IIf([Hinmei/Hinsyu]="Unit SD122V" Or [Hinmei/Hinsyu]="Unit SD082HD","HD","Common")) AS [Group]
FROM [Defect Detail Information List]
INNER JOIN Daily_Output20151013 
   ON (Daily_Output20151013.[Ledger No] = [Defect Detail Information List].[Ledger No]) 
  AND ([Defect Detail Information List].[Order Class] = Daily_Output20151013.[Order Class]) 
  AND (Daily_Output20151013.[Unit No] = [Defect Detail Information List].[Unit Lot No]) 
  AND (Daily_Output20151013.[Hinmei/Hinsyu] = [Defect Detail Information List].[Hinmei-Hinsyu Name]) 
  AND ([Defect Detail Information List].[Lot No] = Daily_Output20151013.[Lot No])
GROUP BY 
   Daily_Output20151013.[Hinmei/Hinsyu],
   [Defect Detail Information List].[Find Process Name],
   IIf([Hinmei/Hinsyu]="Unit SD143S" Or [Hinmei/Hinsyu]="Unit SD111S","HP",IIf([Hinmei/Hinsyu]="Unit SD122V" Or [Hinmei/Hinsyu]="Unit SD082HD","HD","Common"));

我遇到的问题是[查找流程名称]。

提前感谢您的帮助。

0 个答案:

没有答案