Reputation: 13
I am working on Standard Access. I wrote this code:
SELECT *
FROM room
WHERE price < 40 AND
type IN ('Double", "Single")
ORDER BY price;
when I run it, it's telling me this message
Syntax error in string in query expression price < 40 AND type IN ('Double", "Single") ORDER BY price;
Upvotes: 1
Views: 544
Reputation: 56026
You cannot mix single- and double-quotes. Also, type
is a reserved word.
So try:
SELECT *
FROM room
WHERE price < 40 AND [type] IN ("Double", "Single")
ORDER BY price;
Upvotes: 0
Reputation: 312259
String literals in SQL are denoted by single quotes, not double quotes:
SELECT * FROM room WHERE price < 40 AND type IN ('Double', 'Single') ORDER BY price
Upvotes: 0