Missing Operator Error in Access

  • Thread starter Thread starter CJM
  • Start date Start date
C

CJM

I'm trying to install a freebie app downloaded from the web.

Its based on an Access Db, and I'm getting the a missing operator error for
the following SQL:

SELECT COUNT(DatabaseUsers.database_id) As Total FROM Users INNER JOIN
DatabaseUsers ON Users.username = DatabaseUsers.user_id INNER JOIN Databases
ON DatabaseUsers.database_id = Databases.ID WHERE Users.username = ''

I've imported the DB in to SQL server to test in Query Analyser, and this
SQL works fine...

Any ideas?

TIA

Chris
 
You need to use () around the joins in Access.

SELECT
COUNT(DatabaseUsers.database_id) As Total
FROM
(
(
Users
INNER JOIN
DatabaseUsers
)
INNER JOIN
Databases
ON
DatabaseUsers.database_id = Databases.ID
)
ON
Users.username = DatabaseUsers.user_id
WHERE
Users.username = ''

(I think that's correct - best bet is to build the Query in the Access Query
builder - you'll see how Access puts in the brackets for you).

Cheers
Ken



: I'm trying to install a freebie app downloaded from the web.
:
: Its based on an Access Db, and I'm getting the a missing operator error
for
: the following SQL:
:
: SELECT COUNT(DatabaseUsers.database_id) As Total FROM Users INNER JOIN
: DatabaseUsers ON Users.username = DatabaseUsers.user_id INNER JOIN
Databases
: ON DatabaseUsers.database_id = Databases.ID WHERE Users.username = ''
:
: I've imported the DB in to SQL server to test in Query Analyser, and this
: SQL works fine...
:
: Any ideas?
:
: TIA
:
: Chris
:
:
 
Back
Top