Here is a complete mind bending equivalent example for SQL Server 2005 and beyond:
create table #Temp
(GroupField int, ValueType varchar(10), Value varchar(2048))
insert into #Temp (GroupField, ValueType, Value) VALUES (1, 'image', 'http://1')
insert into #Temp (GroupField, ValueType, Value) VALUES (1, 'image', 'http://2')
insert into #Temp (GroupField, ValueType, Value) VALUES (2, 'text', 'none')
insert into #Temp (GroupField, ValueType, Value) VALUES (2, 'video', '30mins')
insert into #Temp (GroupField, ValueType, Value) VALUES (2, 'image', 'http://5')
insert into #Temp (GroupField, ValueType, Value) VALUES (3, 'image', 'http://4')
insert into #Temp (GroupField, ValueType, Value) VALUES (3, 'text', 'hello')
insert into #Temp (GroupField, ValueType, Value) VALUES (3, 'image', 'http://7')
insert into #Temp (GroupField, ValueType, Value) VALUES (4, 'image', 'http://0')
SELECT GroupField, ValueType,
LEFT([Values],LEN([Values]) - 1) AS [Values]
FROM (SELECT GroupField, ValueType,
(SELECT value + ', ' AS [text()]
FROM #Temp AS internal
WHERE internal.GroupField = GroupFields.GroupField and internal.ValueType = GroupFields.ValueType
FOR xml PATH ('')
) AS [Values]
FROM (SELECT GroupField, ValueType
FROM #Temp
GROUP BY GroupField, ValueType) AS GroupFields) AS pre_trimmed;
Produces the result:
GroupField ValueType Values
1 image http://1, http://2
2 image http://5
2 text none
2 video 30mins
3 image http://4, http://7
3 text hello
4 image http://0
It might need some ORDER BY
clauses for your particular case ... adapted from Rational Relational - Emulating MySQL’s GROUP_CONCAT() Function in SQL Server 2005