Reputation: 465
I'm trying to execute the following, but am receiving this error:
The objects "Projects" and "Projects" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
SELECT Project.Name, Project.Client, Business.BType
FROM Project
LEFT JOIN Project ON Project.Name = Business.Name
I've got 2 tables - Project and Business. Project has 2 columns - Name, Client Business has 2 columns - Name, BType
I want both Project columns shown, and the Business.BType column shown, if it the Business.Name matches with the Project.Name.
Can anyone please guide me on where I'm going wrong?
Upvotes: 0
Views: 81
Reputation: 360572
Well, for one you're not selecting anything from the business table, because it's not in the FROM
or JOIN
clauses.
FROM Project
LEFT JOIN Project
Perhaps you meant
FROM Project
LEFT JOIN Business
^^^^^^^^
instead?
Upvotes: 3