Deniz
Deniz

Reputation: 17

Access 2007, INSERT INTO (...) Values (...) throws Syntax error

INSERT INTO Employees (fname, lname, address, city, state, zip, phone)
VALUES ('Gustavo', 'Fring’, "125 Birdy Lane", ‘Tucson’, ‘AZ’, #85705#, #520-535-5323#);

Error code: "Syntax error in query expression "Fring’, "125 Birdy Lane", ‘Tucson’, ‘AZ’, #85705#, #520-535-5323#);.

For the life of me I can not figure this out.

Upvotes: 0

Views: 81

Answers (2)

Joren Vandamme
Joren Vandamme

Reputation: 412

I'm not sure why you are putting " around the address and # around the numbers. Doesn't ' work?

Upvotes: 0

Andre
Andre

Reputation: 27644

Are the hash symbols # supposed to be part of the inserted strings?

Also you need to use normal single quotes '' for all strings, not typographic ones ‘’.

VALUES ('Gustavo', 'Fring', '125 Birdy Lane', 'Tucson', 'AZ', '85705', '520-535-5323')

Upvotes: 4

Related Questions