数据类型不匹配时MS Access Query错误

时间:2014-05-14 11:47:50

标签: sql ms-access

您好我正在查询链接表(ms excel表),如果我从下面的WHERE子句中省略“,"Waiting for Losing Communications Provider Validation"”,一切正常,但是如果我把它留下,我得到“数据类型标准不匹配“错误。这非常令人困惑,因为excel表中的记录符合“等待失去通信提供商验证”,我也确保该字段被视为TEXT,所以我不知所措......

任何人的帮助都将不胜感激......

SELECT COUNT(LatestGamma.MainNumber) AS [Ports Complete],
  LatestGamma.LineType,
  LatestGamma.CPStatus,
  MonthName(MONTH(LatestGamma.ConfirmedPortingDate)) AS [MONTH],
  YEAR(LatestGamma.ConfirmedPortingDate)             AS [YEAR]
FROM LatestGamma
WHERE LatestGamma.CPStatus IN ("Port Accepted","Pre Port Test Call Failed",
    "Waiting for Date Change Validation","Waiting for Losing Communications 
     Provider Validation")
AND LatestGamma.OrderID     >77526
GROUP BY LatestGamma.LineType,
  LatestGamma.CPStatus,
  YEAR(LatestGamma.ConfirmedPortingDate),
  MonthName(MONTH(LatestGamma.ConfirmedPortingDate))
ORDER BY YEAR(LatestGamma.ConfirmedPortingDate),
  MonthName(MONTH(LatestGamma.ConfirmedPortingDate));

0 个答案:

没有答案