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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Ambiguous column name 'playerid'. What?

Author  Topic 

Eagle_f90
Constraint Violating Yak Guru

424 Posts

Posted - 2003-02-06 : 10:42:46
I get the error "Ambiguous column name 'playerid'." What does that mean? Here is my select statment.

------------------------------Code---------------------------------

select playerid, movename, movetime, movelevel, location from playermove inner join playertravel on playermove.playerid = playertravel.playerid

--
For those with wings, fly to your dreams

Dearms are what are found at the end of reality, and your reality if what is found at the end of your dreams.

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-02-06 : 10:47:09
You have a [playerid] column in both your [playermove] and [pplayertravel] tables. SQL doesn't know which one you want to return in your select list. You need to limit the scope to one specific table. Read about the SELECT clause in Books Online.



Jay White
{0}
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-02-06 : 11:50:14
select playerid, movename, movetime, movelevel, location
from playermove
inner join playertravel on playermove.playerid = playertravel.playerid

The part that you have to change is in the column list, so:
select playermove.playerid, movename, movetime, movelevel, location
from playermove
inner join playertravel on playermove.playerid = playertravel.playerid

Go to Top of Page
   

- Advertisement -