Avatar of Murray Brown
Murray Brown
Flag for United Kingdom of Great Britain and Northern Ireland asked on

SQL Error same exposed names

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])
Microsoft SQL Server

Avatar of undefined
Last Comment
Murray Brown

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Murray Brown

Thanks very much
Your help has saved me hundreds of hours of internet surfing.