I have three tables which are:
A(a1, a2, a3)
//This tbl (Table) can have multiple instances of a1, but cause of its dependence on b1,
//we have a unique re
Here is another solution using SQLXML:
SELECT
STUFF
(
(
SELECT ', ' + cast(id AS NVARCHAR(max)) + ': ' + video
FROM Video
ORDER BY Id
FOR XML PATH ('')
),1,1,''
)
CREATE TABLE [dbo].[Video](
[ID] [int] NOT NULL,
[Video] [varchar](50) NOT NULL,
[Views] [int] NOT NULL
)
Result: 1: Hulk, 2: Jack, 3: The King
Update: I also just found this at Data Management and Exchange.