Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Ambiguous column name error

Author  Topic 

outspaced
Starting Member

21 Posts

Posted - 2006-11-16 : 12:39:38
Hi,

I am getting an ambiguous column name error, but I am aliasing the column in question. The problem seems to be that I'm trying to use the same column in 2 inner joins:

select trackprice.id from trackprice tp
inner join track tr on tp.trackid = tr.id
inner join trackstorage ts on ts.trackid = tr.id
inner join ... etc ....

.... gives me the error 'ambiguous column name trackid' - can this not be done with inner joins this way?

Thanks,
Alex

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-11-16 : 12:41:28
select tp.id from trackprice tp
....

Jay White
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-11-16 : 12:51:03
you need to supply the rest of the query

but read the hint link in my sig



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -