Solved

Getting error "...have the same exposed names. Use correlation names to distinguish them."

Posted on 2006-07-08
6
5,671 Views
Last Modified: 2007-12-19
I have table [Product].Items and table [Technology].Items
Note that Product and Technology are schema names, so more accurately, I have table Items in schema Products and table Items in schema Technology.

When I try to execute
SELECT [Product].Items.* FROM [Product].Items LEFT OUTER JOIN [Technology].Items ON [Product].Items.ItemID = [Technology].Items.ID

I get the error
Msg 1013, Level 16, State 1, Line 1
The objects "technology.items" and "product.items" in the FROM clause have the same exposed names. Use correlation names to distinguish them.

Why is this error occuring and what do I need to do to fix it?
0
Comment
Question by:stev0931
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17065399
Not sure about this , can you replace * with the desired column names in the Query

SELECT ProItms.Column1,  ProItms.Column2,ProItms.Column3
FROM [Product].Items ProItms
LEFT OUTER JOIN [Technology].Items
ON ProItms.ItemID = [Technology].Items.ID
0
 

Author Comment

by:stev0931
ID: 17065404
No, I get the same error
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 17065419
try this


SELECT ProItms.*
FROM [Product].Items ProItms
LEFT OUTER JOIN [Technology].Items  TechItms
ON ProItms.ItemID = TechItms.ID
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:stev0931
ID: 17065429
That works, but it requires rewriting all multi-part identifyers (i.e. the TechItms.ID cannot be written as [Tech].Items.ID), which will require me to go through and rewrite a bunch of code.

Is there any other way of fixing this?
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 500 total points
ID: 17065439
The only way i feel is to provide the aliases for those tables...
0
 

Author Comment

by:stev0931
ID: 17065681
Thanks!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question