I'm using Java 1.8.0_112.
I am attempting to insert customer information where the address matches in two separate tables into a third Access table.
INSERT INTO SalesResponse(address, zip, dealno, dealstatus, vin, fullname, first, last,city, make, model, vehyear,email, selldate, profit, dealnuo) SELECT address, zip, dealno, dealstatus, vin, fullname, first, last,city, make, model, vehyear,email, selldate, profit, dealnuo FROM 2856FI INNER JOIN JOB ON (2856FI.ADDRESS = JOB.address) AND (LEFT(2856FI.ZIP,5) = LEFT(JOB.ZIP,5)) WHERE ((2856FI.selldate)>#11/09/16#);
But when I try to execute the statement, I am presented with the following error: Cannot execute query! net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.0 unknown token
I cannot figure out what token is unknown. All the fields exist and as far as I can tell I'm using valid SQL. Can anyone point me in the right direction?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using Java 1.8.0_112.
I am attempting to insert customer information where the address matches in two separate tables into a third Access table.
INSERT INTO SalesResponse(address, zip, dealno, dealstatus, vin, fullname, first, last,city, make, model, vehyear,email, selldate, profit, dealnuo) SELECT address, zip, dealno, dealstatus, vin, fullname, first, last,city, make, model, vehyear,email, selldate, profit, dealnuo FROM 2856FI INNER JOIN JOB ON (2856FI.ADDRESS = JOB.address) AND (LEFT(2856FI.ZIP,5) = LEFT(JOB.ZIP,5)) WHERE ((2856FI.selldate)>#11/09/16#);
But when I try to execute the statement, I am presented with the following error:
Cannot execute query! net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.0 unknown token
I cannot figure out what token is unknown. All the fields exist and as far as I can tell I'm using valid SQL. Can anyone point me in the right direction?
Thanks!
I was able to reproduce your issue. I found that I could avoid the error by simply using a four-digit year in the date literal, i.e. by changing
WHERE ((2856FI.selldate)>#11/09/16#)
to
WHERE ((2856FI.selldate)>#11/09/2016#)
Ahh thank you that made the error stop!