user3772278
user3772278

Reputation: 3

SQL Query in Access missing operator syntax error

Hi i created a database in Microsoft Access and i have been trying to find specific stuff through query's but when i try to test my query i keep getting a syntax error saying i miss an operator this is my query:

SELECT student.name
FROM institution 
    INNER JOIN major on major.institutionID = institution.institutionID
    INNER JOIN class on class.majorID = major.majorID
    INNER JOIN student on student.classID = class.classID 
WHERE institution.institutionName == CMI && student.gender == boy;

Upvotes: 0

Views: 339

Answers (2)

Eccountable
Eccountable

Reputation: 642

use the word AND instead of && in your where clause

Upvotes: 0

Gordon Linoff
Gordon Linoff

Reputation: 1271211

Try changing the where clause to this:

WHERE institution.institutionName = "CMI" AND student.gender = "boy";

In MS Access, & is for string concatenation. I assume the error is because a string is expected between the two &s.

Upvotes: 3

Related Questions