Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi-part identifier could not be bound? 1

Status
Not open for further replies.

tqeonline

MIS
Oct 5, 2009
304
US
Guys what am i missing?

Code:
    SELECT 'Details' as 'Details' 
		,REL_ID as 'Release ID'
		,REL_NAME as 'Release Name'
		,ISNULL(REL_USER_09,'') as 'Env'
		,ISNULL(REL_USER_12,'') as 'Master RFC'
		,REL_USER_18 as 'PM'
		,REL_USER_19 as 'PDM'
		,REL_USER_20 as 'RM'
		,REL_USER_17 as 'Scrum Master'
		,REL_USER_10 as 'Test Lead'
		,CAST(REL_USER_13 AS DATETIME) as 'Test Start'
		,CAST(REL_USER_14 AS DATETIME) as 'Test End'
		,CAST(REL_USER_02 AS DATETIME) as 'Prod Start'
		,CAST(REL_USER_05 AS DATETIME) as 'Prod End'
		,REL_USER_21 as 'Status'
		,REL_USER_22 as 'CAB'
		,isnull(convert(varchar(3000),REL_USER_11),'No Pipeline Comments to Report') as 'Comments'
		,isnull(convert(varchar(3000),REL_USER_07),'No Scope to Report') as 'Scope'
		,isnull(convert(varchar(3000),REL_DESCRIPTION), 'No Important Updates to Report') as 'Important Updates'
	    ,isnull(convert(varchar(3000),REL_USER_04), 'No Issues/Risks to Report') as 'Issues/Risks'
	    ,isnull(convert(varchar(3000),REL_USER_06), 'No Mitigation Plan to Report') as 'Mitigation Plan'
	    ,isnull([Cycle_Count],0) as 'Cycle Count'
	    
  FROM [RELEASES] WITH (NOLOCK),[RELEASE_FOLDERS] WITH (NOLOCK)

	LEFT OUTER JOIN
	(
	SELECT RCYC_PARENT_ID, COUNT(RCYC_ID) AS 'Cycle_Count'
	FROM RELEASE_CYCLES WITH (NOLOCK)
	GROUP BY RCYC_PARENT_ID
	) t1
	ON t1.RCYC_PARENT_ID = RELEASES.REL_ID
	
  WHERE [RF_PATH] NOT LIKE 'AAAAAUAAA%'
		--[RF_PATH] LIKE '%AAAAAX%'
		--[RF_PATH] LIKE '%AAAAAU%' 
	AND [REL_USER_21] <> 'Production' 
	AND [REL_USER_21] <> 'Cancelled'
	AND [RELEASES].[REL_PARENT_ID] = [RELEASE_FOLDERS].[RF_ID]
	AND [REL_NAME] NOT LIKE 'Project -%'
  ORDER BY REL_USER_02

The
Code:
ON t1.RCYC_PARENT_ID = RELEASES.REL_ID

is coming back saying

Msg 4104, Level 16, State 1, Procedure SQA_DASH_PIPELINE, Line 38
The multi-part identifier "RELEASES.REL_ID" could not be bound.

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
This works
Code:
select REL_NAME, isnull([Cycle_Count],0) as 'Cycle Count'
from RELEASES with (nolock)

left outer join
(
SELECT RCYC_PARENT_ID, COUNT(RCYC_ID) AS 'Cycle_Count'
FROM RELEASE_CYCLES WITH (NOLOCK)
GROUP BY RCYC_PARENT_ID
) t1
ON t1.RCYC_PARENT_ID = RELEASES.REL_ID

it makes me think I haven't setup the inner join on Release_Folders correctly.

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
Try this:

Code:
  FROM [RELEASES] WITH (NOLOCK)
    [!]INNER JOIN[/!] [RELEASE_FOLDERS] WITH (NOLOCK)
      [!]ON [RELEASES].[REL_PARENT_ID] = [RELEASE_FOLDERS].[RF_ID][/!]
    LEFT OUTER JOIN
    (
    SELECT RCYC_PARENT_ID, COUNT(RCYC_ID) AS 'Cycle_Count'
    FROM RELEASE_CYCLES WITH (NOLOCK)
    GROUP BY RCYC_PARENT_ID
    ) t1
    ON t1.RCYC_PARENT_ID = RELEASES.REL_ID
    
  WHERE [RF_PATH] NOT LIKE 'AAAAAUAAA%'
        --[RF_PATH] LIKE '%AAAAAX%'
        --[RF_PATH] LIKE '%AAAAAU%' 
    AND [REL_USER_21] <> 'Production' 
    AND [REL_USER_21] <> 'Cancelled'
    AND [REL_NAME] NOT LIKE 'Project -%'
  ORDER BY REL_USER_02



-George
Microsoft SQL Server MVP
My Blogs
SQLCop
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Boom! perfect!

- Matt

"If I must boast, I will boast of the things that show my weakness"

- Windows 2003 Server, 98 SE, XP
- VB.NET, VSTS 2010, ASP.NET, EXCEL VBA, ACCESS, SQL 2008
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top