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.
| Author |
Topic |
|
srucker
Starting Member
26 Posts |
Posted - 2008-06-18 : 10:34:51
|
| use projectserver2003select r.RES_NAME, p.PROJ_NAME, a.TASK_NAME, w.WWORK_START, w.WWORK_FINISH, w.WWORK_VALUEfrom MSP_WEB_RESOURCES r, MSP_WEB_ASSIGNMENTS a, MSP_WEB_PROJECTS p, MSP_WEB_WORK wjoin MSP_VIEW_PROJ_TASKS_ENT TE on r.WPROJ_ID=TE.WPROJ_IDjoin MSP_VIEW_PROJ_RES_ENT RE on r.WPROJ_ID=RE.WPROJ_IDjoin MSP_VIEW_PROJ_PROJECTS_ENT PE on r.WPROJ_ID=PE.WPROJ_IDwhere w.WWORK_TYPE = 1 -- actual workand w.WASSN_ID = a.WASSN_IDand a.WPROJ_ID = p.WPROJ_IDand a.WRES_ID = r.WRES_IDThis statement is returning the following errors:Msg 4104, Level 16, State 1, Line 2The multi-part identifier "r.WPROJ_ID" could not be bound.Msg 4104, Level 16, State 1, Line 2The multi-part identifier "r.WPROJ_ID" could not be bound.Msg 4104, Level 16, State 1, Line 2The multi-part identifier "r.WPROJ_ID" could not be bound.I have all tables identified; however unclear as to why it cannot be bound.Please help. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-18 : 10:36:48
|
| Do you have column WPROJ_ID in table MSP_WEB_RESOURCES? |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-18 : 10:51:59
|
And this is a strange mix of JOIN ansi types.USE ProjectServer2003SELECT r.RES_NAME, p.PROJ_NAME, a.TASK_NAME, w.WWORK_START, w.WWORK_FINISH, w.WWORK_VALUEFROM MSP_WEB_RESOURCES AS r INNER JOIN MSP_WEB_ASSIGNMENTS AS a ON a.WRES_ID = r.WRES_IDINNER JOIN MSP_WEB_WORK AS w ON w.WASSN_ID = a.WASSN_IDINNER JOIN MSP_WEB_PROJECTS AS p ON p.WPROJ_ID = a.WPROJ_IDINNER JOIN MSP_VIEW_PROJ_TASKS_ENT AS te ON te.WPROJ_ID = r.WPROJ_IDINNER JOIN MSP_VIEW_PROJ_RES_ENT AS re ON re.WPROJ_ID = r.WPROJ_IDINNER JOIN MSP_VIEW_PROJ_PROJECTS_ENT AS pe ON pe.WPROJ_ID = r.WPROJ_IDWHERE w.WWORK_TYPE = 1 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-18 : 10:55:53
|
| And always better to use the ANSI JOIN syntax as it has more clarity and other join syntax wont be supported from SQL 2005 compatibility level 90 onwards |
 |
|
|
srucker
Starting Member
26 Posts |
Posted - 2008-06-18 : 11:15:05
|
| Thanks for the education on syntax. I found columns to join the tables on.Much appreciated. |
 |
|
|
|
|
|
|
|