Link to home
Create AccountLog in
Avatar of Murray Brown
Murray BrownFlag 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])
Avatar of Dulton

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Murray Brown


Thanks very much