Problems with inner join

G

Guest

Hi,
I got a query which I am running from access sql window.The
tables are linked. When I am trying to run the query, I get a syntax error
stating the error is in the from clause.
I cannot figure out why this is so. I appreciate any help in advance. Thanks

CODE:


SELECT au_lname, au_fname, title, pub_name
FROM authors a INNNER JOIN titleauthor ta
ON a.au_id = ta.au_id INNER JOIN titles t
ON t.title_id = ta.title_id INNER JOIN publishers p
ON t.pub_id = p.pub_id
 
T

Tom Ellison

Dear Jack:

If you are writing this for Access Jet, you must parenthesize the JOINs.
How you do this turns out to be arbitrary. For example:

SELECT au_lname, au_fname, title, pub_name
FROM authors a
(INNNER JOIN titleauthor ta ON a.au_id = ta.au_id
(INNER JOIN titles t ON t.title_id = ta.title_id
(INNER JOIN publishers p ON t.pub_id = p.pub_id)))

This might be the cause of your problem.

Tom Ellison
 
G

Guest

Thanks for the help Tom. However with the stipulation you suggested, I still
get the same error. Is is then something else that is screwing up? No idea.
 
B

Brendan Reynolds

If this is your actual, copied-and-pasted SQL, and you didn't re-type it
into the newsgroup post, then the fact that you have three letter 'N's in
your first "INNNER" might explain your problem. Of course, if you did
re-type, that's probably just a typo in the newsgroup post, in which case
please disregard this post.
 

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