Inner Join with three tables... what am I doing wrong?

N

Noozer

Can anyone see what is wrong with the following query?

SELECT * FROM Tickets
INNER JOIN Choices2Ticket ON Tickets.TicketKey=Choices2Ticket.TicketKeyLink
INNER JOIN Choices ON Choices2Ticket.ChoiceKeyLink=Choices.ChoiceKey;

When I try and save this query I get the following error:

Syntax error (missing operator) in query expression
'Tickets.TicketKey=Choices2Ticket.TicketKeyLink INNER JOIN Choices ON
Choices.ChoiceKey=Choices2Ticket.ChoiceKeyLink'.

All the table and column names are spelled correctly and do exist in the
specified tables.

This is running on MS Access 2003... eventually to be used on an ASP page
with the JET engine.
 
N

Noozer

Thanks! I new I was doing something dumb...

giorgio rancati said:
Hi, Noozer

they are lacking the parenthesis in the first join.
----
SELECT * FROM (Tickets
INNER JOIN Choices2Ticket ON
Tickets.TicketKey=Choices2Ticket.TicketKeyLink)
INNER JOIN Choices ON Choices2Ticket.ChoiceKeyLink=Choices.ChoiceKey;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top