Solved

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

Posted on 2006-07-08
6
5,636 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
  • 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

786 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