We help IT Professionals succeed at work.
Get Started

SQL Error same exposed names

Murray Brown
Murray Brown asked
Last Modified: 2014-05-05
I get the following error when trying to run the SQL further down

Msg 1013, Level 16, State 1, Line 1
The objects "Orders" and "Orders" in the FROM clause have the same exposed names. Use correlation names to distinguish them.

SELECT [Orders].[Order ID], [Orders].[Employee ID], [Orders].[Order Date], [Orders].[Order Date], [Orders].[Shipped Date], [Orders].[Shipper ID], [Orders].[Ship Name], [Orders].[Ship Address], [Orders].[Ship Address], [Orders].[Ship City], [Orders].[Ship State/Province], [Orders].[Ship ZIP/Postal Code], [Orders].[Ship Country/Region], [Orders].[Ship Country/Region], [Orders].[Shipping Fee], [Orders].[Taxes], [Orders].[Payment Type], [Orders].[Paid Date], [Orders].[Notes], [Orders].[Tax Rate], [Orders].[Tax Status], [Orders].[Status ID], [Invoices].[Invoice ID], [Invoices].[Invoice Date], [Invoices].[Invoice Date], [Invoices].[Due Date], [Invoices].[Tax], [Invoices].[Shipping], [Invoices].[Amount Due], [Customers].[ID], [Customers].[Company], [Customers].[Last Name], [Customers].[First Name], [Customers].[E-mail Address], [Customers].[Job Title], [Customers].[Business Phone], [Customers].[Home Phone], [Customers].[Fax Number], [Customers].[Address], [Customers].[City], [Customers].[State/Province], [Customers].[ZIP/Postal Code], [Customers].[ZIP/Postal Code], [Customers].[Country/Region], [Customers].[Web Page], [Customers].[Notes], [Customers].[Attachments] FROM [Orders] LEFT JOIN [Customers] ON ([Orders].[Customer ID] = [Customers].[ID]), [Orders] RIGHT JOIN [Invoices] ON ([Orders].[Order ID] = [Invoices].[Order ID])
Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE