我有一个非常像这样的查询:
SELECT * FROM t1 LEFT JOIN t2 ON t1.aNumber = t2.aNumber;
当我尝试运行它时,我得到Invalid Operation
。以下两个查询运行正常:
SELECT * FROM t1;
SELECT * FROM t2;
所以我猜这个问题是非常明显还是非常复杂......在这种情况下如何找到问题呢?
为了完整性,这里是实际查询(Query25)以及它引用的所有其他查询:
Query25
SELECT *
FROM [EXPORT PRICE AND Desc] LEFT JOIN Export_Union_active ON [EXPORT PRICE AND Desc].MaterialNumber = Export_Union_active.MaterialNumber;
出口价格和描述
SELECT tblMMMaterials.MaterialNumber, tblMMMaterials.MaterialDescription AS name, Format(tblMMMaterials!SellingPrice,"Standard") AS SellingPrice, dbo_tblMMImages.Notes, tblMMMaterials.MFG, tblMMMaterials.Internet
FROM tblMMMaterials LEFT JOIN dbo_tblMMImages ON tblMMMaterials.MaterialID = dbo_tblMMImages.MaterialID
WHERE (((tblMMMaterials.Internet)=True));
Export_Union_active
select * from Export_Active UNION ALL select * from Export_Inactive;
Export_Active
SELECT tblMMMaterials.MaterialNumber, tblMMMaterials.Discontinued, 1 AS [check], tblMMMaterials.MFG
FROM tblMMMaterials
WHERE (((tblMMMaterials.Discontinued)=0) AND ((tblMMMaterials.MFG)="kheops"));
Export_Inactive
SELECT tblMMMaterials.MaterialNumber, tblMMMaterials.Discontinued, 0 AS [check], tblMMMaterials.MFG
FROM tblMMMaterials
WHERE (((tblMMMaterials.Discontinued)=1) AND ((tblMMMaterials.MFG)="kheops"));
以下是所有这些查询所引用的表格(它们比这大得多,但我删除了任何查询中未使用的内容):
tblMMMaterials
MaterialID | Number | PK
MaterialNumber | Text
MaterialDescription | Text
SellingPrice | Currency
MFG | Text
Internet | Yes/No
Discontinued | Yes/No
tblMMImages
ImageID | AutoNumer | PK
MaterialID | Number
Notes | Memo