Results 1 to 4 of 4
  1. #1
    blacksaibot is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    34

    Syntax error? I beg to differ

    Seriously, what in the hell is wrong with the syntax of this statement?




    Code:
    UPDATE 573_sae_data_new_aerpt
    INNER JOIN 573_sae_data_new
    ON 573_sae_data_new_aerpt.CSPCCID = 573_sae_data_new.CSPCCID
    SET 573_sae_data_new_aerpt.AERPT = 573_sae_data_new.AERPT

    Access gives the lovely error:
    Syntax error in the query expression '573_sae_data_new_aerpt.CSPCCID = 573_sae_data_new.CPSCCI'.


    Is there some stupid reason it's leaving off the "D" in CPSCCID at the end of this error message? Even if I screw around with my own query and type CSPCCIDxx it types it as "CPSCIDDx" in the error message.


    What the hell is going on?

  2. #2
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    There is a ) at the end of the query that doesn't belong there.

  3. #3
    blacksaibot is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    34
    Yeha that was a typo in the forum, it still doesnt work after removing it

  4. #4
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    Only a guess, as I think the SQL parser is a little bit picky here: set your query names between [] to escape them, or the parser tries to recognize them as numbers, because their names begin with a digit.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 05-01-2014, 11:56 AM
  2. Replies: 3
    Last Post: 01-23-2014, 07:49 AM
  3. Replies: 3
    Last Post: 03-05-2013, 11:17 AM
  4. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  5. Incomplete Syntax Clause (syntax error)
    By ajetrumpet in forum Programming
    Replies: 4
    Last Post: 09-11-2010, 10:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums