Menu

unknown token

Help
2017-01-18
2017-01-19
  • jessica nesler

    jessica nesler - 2017-01-18

    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!

     
  • Gord Thompson

    Gord Thompson - 2017-01-18

    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#)

     
    • jessica nesler

      jessica nesler - 2017-01-19

      Ahh thank you that made the error stop!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.