计算字段导致另一个查询字段中的重复项

时间:2013-12-06 16:38:23

标签: sql ms-access syntax calculated-field

我在MS Access DB中创建了一个计算字段。此字段旨在将“构建速率”除以“调整总计”。运行查询时的问题是,它在“LS_Name”字段中生成重复项。我相信我的语法有问题;请帮忙。这是SQL:

SELECT DISTINCT Claims.LS_Name, Suppliers.QE, Suppliers.Group, 
    [Issue Bucket].Status, [Issue Bucket].[Total $], Claims.[Total(Total)], 
    Claims.Debited, Year([Jdg_date]) & Month([Jdg_date]) AS PayDate, 
    Claims.Hour_Meter, Claims.Line_off_Date, 
    Month([Line_off_Date]) & "/1/" & Year([Line_off_Date]) 
        AS [CDate(«expression») «Expr» LOD], 
    [Adjust(Total)]/([Build Rate]![(Total]) AS WCPperUnit
FROM [Build Rate], Suppliers 
   INNER JOIN ([Issue Bucket] 
       INNER JOIN Claims ON [Issue Bucket].[Issue Bucket] = Claims.[Issue Description]) 
   ON (Suppliers.Supplier = Claims.LS_Name) 
   AND (Suppliers.[Supplier Code] = [Issue Bucket].LS_Name)
WHERE (((Claims.Debited)=False));

0 个答案:

没有答案