#1
  1. An Ominous Coward
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2002
    Posts
    4,425
    Rep Power
    0

    Syntax Error thrown on basic SQL Statement


    Would someone PLEASE explain to me why this throws a syntax error when executed on an Access database?
    Code:
    INSERT INTO c_summs_index(TABLE, CYCLE, KEYWORD) 
       ->  Values('tablename', 30922, 'Buick')
    (->) just indicates continued from last line.

    I swear I'm losing it here... I can't figure out what's wrong with this SQL...
  2. #2
  3. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    3,608
    Rep Power
    26
    Don't have Access available right now, but 'TABLE' should be a reserved word in Access... Can you escape it with backticks or similar? Or just chose another column name?

    //NoXcuz
    UN*X is sexy!
    who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep
  4. #3
  5. An Ominous Coward
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2002
    Posts
    4,425
    Rep Power
    0
    Ah... it would seem that gratuitous slapping of the forehead is in order.....

    Thanks for pointing out my er... "problem", even if it wasn't EXACTLY in the SQL...

IMN logo majestic logo threadwatch logo seochat tools logo