I have tried googling this but to no avail - I am not quite understanding what I am doing wrong with this SQL code. I am currently at a loss. What does this error mean and what is my likely culprit?
As you can see, I am trying to insert into a processing table from 2 original tables with only 1 simple WHERE condition. Any help is appreciated!
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
BATCH_NO? Another cause of this error can be column names that contain special characters or are reserved words that are not qualified properly ([]), I can't see any obvious culprits, but it is probably worth double checking.