I have a table CSFT_SuggestionItem with cols like:
SuggestionItemID Title Description, etc.
------------------------------------------------------------
1 Item 1 Do more work
2 Item 2 I think more is good
For each SuggestionItem, there can by multiple "Applications" where it can be associated, so I have CSFT_SuggestionItemApplication
SuggestionItemID ApplicationID
----------------------------------
1 1
1 2
2 1
And I have an CSFT_Application Table
ApplicationID Description
----------------------------------
1 Spring
2 Summer
3 Fall
4 Winter
I want my output to look like this:
SuggestionItemID Applications
----------------------------------
1 Spring, Summer
2 Spring
I know I can do this by Looping. But, is there a better way in Sql server 2005? Maybe COALESCE, PIVOT, etc.