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
 multi-part identifier error

Author  Topic 

pgmr1998
Yak Posting Veteran

66 Posts

Posted - 2010-09-30 : 16:35:32
I am getting the foll error message:
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "TM_Category.ID" could not be bound
.

Here is my code:
select * from te_TimeCapture, tm_Category
TM_project, te_timesheet, TM_User,
te_list_timeCaptureType

where TM_Category.ID = TE_TimeCapture.CategoryCID
order by TE_TimeCapture.CategoryCID

Does anyone know what this means?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-30 : 16:57:34
Case sensitive collation?

Can you change it to an ANSI join?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

pgmr1998
Yak Posting Veteran

66 Posts

Posted - 2010-09-30 : 17:13:18
I get the same result:
select * from te_TimeCapture,
TM_project, te_timesheet, TM_User,
te_list_timeCaptureType

inner join TM_Category on TM_Category.ID = TE_TimeCapture.CategoryCID
order by TE_TimeCapture.CategoryCID

Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "TE_TimeCapture.CategoryCID" could not be bound.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-09-30 : 17:15:25
Forget the binding message, unless you've left out a lot of where clause conditions, you have a multi-cartesian product there. 6 tables and only two have any 'join' defined.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-30 : 17:15:46
select *
from te_TimeCapture te
join TM_Category tm
on tm.ID = te.CategoryCID
order by te.CategoryCID

If you still get the error, then you'll need to verify the object names.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-09-30 : 17:16:14
Does TM_Category have a column called ID in it?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-09-30 : 17:17:54
Tara, you have a stray comma in that, before the JOIN

--
Gail Shaw
SQL Server MVP
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-09-30 : 17:56:37
Thanks, I edited my post.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -