我试过用谷歌搜索,但无济于事——我不太明白我在使用这个 SQL 代码时做错了什么。我目前不知所措。这个错误是什么意思,我可能的罪魁祸首是什么?
如您所见,我正在尝试从只有 1 个简单 WHERE 条件的 2 个原始表中插入处理表。任何帮助表示赞赏!
CurrentDb.Execute "
INSERT INTO Processing
([State], [Zip Code], [Gross Sales], [Sales Exempt Type],
[Sales Exempt Amount], [Taxable], [Tax], BATCH_NO, FILENAME,FILEPATH,
USERNAME, IMPORT_TIMESTAMP)" & _
"
SELECT [tblImport].[State/ Province]
, [tblImport].[Dest Postal Code]
, [tblImport].[Line Amount]
, [tblImport].[Jurisdiction Description]
, [tblImport].[Line Exempt]
, [tblImport].[Line Taxable Amount]
, [tblImport].[Tax Amount]
, [batch].BATCH_NO
, [batch].FILENAME
, [batch].FILEPATH
, [batch].IMPORT_USERNAME
, [batch].IMPORT_TIMESTAMP " & _
"
FROM batch
, tblImport
WHERE BATCH_NO =" & li_batch_no