Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Syntax Error

Status
Not open for further replies.
Mar 10, 2005
63
US
Hello, I am having an issue with a query containing some inner joins. It checks out fine within SQL 2005 but Access does not like the query syntax.

Here is my query:
Code:
SELECT TOP 5 Category.Title, article.pubDate, article.Title AS Title, * 
FROM Article 
INNER JOIN Article_Category ON Article.ID = Article_Category.ArticleID
INNER JOIN Category ON Article_Category.CategoryID = Category.ID
WHERE Article.ID IN (SELECT Article_Category.ArticleID FROM  Article_Category
WHERE Article_Category.CategoryID IN ( 
SELECT Article_Category.CategoryID 
FROM Article_Category 
WHERE Article_Category.CategoryID.ArticleID = 5132005));

Any help would be great. Thanks.
 
...
FROM [!]([/!]Article
INNER JOIN Article_Category ON Article.ID = Article_Category.ArticleID[!])[/!]
INNER JOIN Category ON Article_Category.CategoryID = Category.ID
...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the response PHV, but that didn't seem to fix it, but I'm getting a different error now. It says,"Syntax error in FROM clause.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top