[英]Querying from multiple linked Excel files
我目前已将多个Excel文件链接到Access(每月一个文件),我想从每个文件创建一个查询,该查询将给我一个“主查询”。 所有文件的标题和格式均完全相同。 我无法将所有三个合并,然后再链接,因为它已经超出了Excel Maximum。
我尝试了这个,它给我Data type mismatch in criteria expression
错误
SELECT [Created Date], [Store Name], ProductID, [Customer First Name] & " " & [Customer Last Name] AS CustomerName
FROM August2015
WHERE ProductID = 1587996 OR ProductID = 1587985
UNION
SELECT [Created Date], [Store Name], ProductID, [Customer First Name] & " " & [Customer Last Name] AS CustomerName
FROM July2015
WHERE ProductID = 1587996 OR ProductID = 1587985
UNION
SELECT [Created Date], [Store Name], ProductID, [Customer First Name] & " " & [Customer Last Name] AS CustomerName
FROM June2015
WHERE ProductID = 1587996 OR ProductID= 1587985
有人可以指出我正确的方向。 谢谢。
听起来ProductID是一个字符串。 如果是这样的话:
WHERE ProductID = '1587996' OR ProductID = '1587985'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.