DCSIMG
January 2012 - Posts - Adlai Maschiach

Adlai Maschiach

" You have to show in order to be seen "

News

Favorite Links

news

CardSpace

Books

Other InfoCards Proj

Virtual Earth

WSS / Sharepoint

SOA , Biztalk & ESB

CLR / .NET

January 2012 - Posts

TSQL: Concatenate Column from Multiple Rows into String

Ok , So I had a problem related to concatenation of a single Column into one ( same ) column when using GROUP BY .
The Problem came from a Reporting Services perspective and there might be other solutions ( like coding in VB.NET in the report )

I have found a very nice samples :

Option 1:

use Northwind

declare @CategoryList varchar(1000)
set @CategoryList =''
select @CategoryList = @CategoryList + ' , ' + CategoryName from Categories

select 'Results = ' + @CategoryList

Option 2:

use Northwind

declare @CategoryList varchar(1000)
select @CategoryList = coalesce(@CategoryList + ', ', '') + CategoryName from Categories

select 'Results = ' + @CategoryList

In the end I used option 2 as part of a UserDefiendFunction .

The manipulation was that the of the “GROUP BY” was sent to the UDF to use in it’s select “where” , so it could return the filtered row concatenated. And that UDF was called as part of the grand SELECT.

NOTE: this is a developer solution , a DBA might have a better solution ;)

SharePoint 2010 : The following computer running SharePoint does not contain the required Infopath form template

What can I say … except "elementary my dear Watson" ;)

Ok , the problem is that you didn’t activate a feature in the site you’re working with :P

go to : Site Actions > Site Settings > Manage Site Features > Team Collaboration Lists.

The problem :

Untitled

The solution:

Untitled2

Untitled3

Untitled4

( Personal Note: I know it has been a while , but once in a while doesn’t hurt ;)  )