Possible Duplicate:
SQL Server: Can I Comma Delimit Multiple Rows Into One Column?
Is this possible? i have a temp table that can have many rows ex:
interaction type name points
6 India 50
8 India 100
in my main table CategoriesTable i have one field called HintText
How can i get those to rows as HintText = 6,India,50|6,India,100?
here my code so far:
UPDATE #CategoriesTable
SET HintText = t.Name + ',' + t.Points + ',' + t.interactiontype
FROM #CategoriesTable
INNER JOIN #temp1 t ON t.userId = #CategoriesTable.UserId
WHERE t.userId = #CategoriesTable.UserId
in my sproc:
HintText nvarchar(256),
and in my repository:
trainingModuleProgressState.HintText = row["HintText"].ToString();
in my datamodel:
public string HintText { get; set; }
this will give me one row, how do i get the second row in?