James Wilson
James Wilson

Reputation: 45

INNER JOIN BIZZARE ERROR

I'm building a query to pull data from mutliple tables to generate a report, but the INNER JOIN's give me a "Syntax error in JOIN operation." and highlight the ON keyword. I suspect this is a simple problem, but I cannot for the life of me figure it out. please help.

SELECT
    [_MAIN_].ID,
    [_MAIN_].Project,
    [_MAIN_].Client,
    [_MAIN_].Description,
    [_MAIN_].[Sub Project],
    Tasks.Task
FROM ( [_MAIN_]
    INNER JOIN (Tasks ON [_MAIN_].Tasks = Tasks.ID))

Upvotes: 0

Views: 55

Answers (1)

SqlZim
SqlZim

Reputation: 38023

Your parenthesis look off.

Try this:

SELECT
    m.ID,
    m.Project,
    m.Client,
    m.Description,
    m.[Sub Project],
    t.Task
FROM [_MAIN_] as m
  INNER JOIN Tasks as t 
    ON m.Tasks = t.ID

Upvotes: 2

Related Questions