Reputation: 1
I have an SQL insert statement:
INSERT INTO Customers (FirstName, LastName, Note) VALUES ('Sam', 'Jones', 'Works Mondays Only');
If I run the above statement as is, MS Access 2013 generates this error message: Syntax error in INSERT INTO statement.
But if I put brackets around [Note] it works. IF I change the name to fNote without brackets.....It works. (could be jNote or anything.)
There are no other fields in entire database named 'Note'.
The word 'Note' is a short text data type set in table.
I even created a new database with only one table and one field with the name "Note"...Same thing. Error if I try to use this word without brackets.
HELP.....!!!!!! AM I MISSING SOMETHING.
The word "Note" isn't a reserved word as far as I can find.
Whats wrong with the word "Note" ?????
Upvotes: 0
Views: 418
Reputation: 533
In order to use the a reserved name like that you have to put a bracket around it.
INSERT INTO Customers (FirstName, LastName, [Note]) VALUES ('Sam', 'Jones', 'Works Mondays Only');
Not a recommendation but its a workaround if you don't want to mess up what you have already created.
Upvotes: 0
Reputation: 18823
The word NOTE
is a reserved word, according to Access 2007 reserved words and symbols.
This from the "N" section of the reserved words from the link:
NAME
NewPassword
NO
Not
Note
NULL
NUMBER, NUMERIC
You'll have to use the brackets.
Upvotes: 2