Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009

    Unanswered: inexact error message "Error in SQL syntax"


    I have a curious problem with my SQL Server.
    I am developing a web application which uses of course also a database.
    Till today I used German names and descriptions and everthing worked fine. Now I decided to translate all tables, etc. into English and one problem occurs:
    When executing a INSERT statement, which wasn't changed att all, I get the following error:

    Script line: 1 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character
    (1,1,1,'HauDraufWieNix',1,0,1,2,3,4,5,6,'Knecht')' at line 2

    Unfortunately the error is not very meaningful, so I want to ask for your help.

    Why can changing the names of a table and its attributes lead to such a error?

    Could the reason be something with the constraints? This is the only thing I can imagine, that maybe I forgot to translated anything. But I checked it as good as I could and didn't find any obvious mistakes.

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    inexact??? on the contrary, it is very exact

    the error message tells you exactly where it happened -- near the word "character"

    it seems you named your table "character" but that's a reserved word

    either rename it again, or put it in backticks --

    INSERT INTO `character` VALUES... | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2007
    Provided Answers: 10
    Quote Originally Posted by r937
    either rename it again, or put it in backticks --
    Home | Blog

  4. #4
    Join Date
    Sep 2009
    Thanks for the fast help! It was indeed the problem that I did not use the backticks.

    However I have still the opinion that "You have an error in your SQL syntax" is not that clear then "duplicated entry" or something like that ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts