Hi all,
I have procedure which has cols like scopeid ,sprintname ,sprintid,highlevelitem,etc
now,if suppose 1 scopeid there are 5 highlevel items and in that 3 highlevelitems have 1sprintname(sp1) and other 2 highlevelitems has other sprintname(sp2)..
now in my procedure i implemented logic coalesce() to get sprintnames as commaseperated for single scopeid..
but the problem is when i implemented coalsce() i'am getting all sprints for single scopeid..in my db for many scopeid's i have only 1 sorintname....but my logic returns output as singlescopeid with mutliplesprints and this is same for all scope's in a project
(actually project has multpile scope's)..
please help me to get appropriate sprint for scopeid and comma seperated values should come correctly..
my coalesce() is:
STUFF(( SELECT COALESCE(CHAR(10)+CONVERT(VARCHAR,SPP.Name )+',', '') FROM Sprint SPP LEFT JOIN sprint_tasks SPT on SPP.sprintid=SPT.sprintid AND SPT.sprintscopeid=SP.scopeid where SPP.ProjectID =SP.ProjectID FOR XML PATH('')), 1, 1, '') as SprintName
lucky