Misschien zoiets als dit (als je MSSQL 2005+ gebruikt):
CREATE TABLE NewTable
(
messageID INT,
sender VARCHAR(100),
recipient VARCHAR(MAX),
date DATETIME
)
INSERT INTO NewTable(messageID,sender,recipient,date)
SELECT
[Message].messageID,
[Message].sender,
STUFF
(
(
SELECT
',' +recipient
FROM
recipientInfo
WHERE
recipientInfo.messageID=[Message].messageID
FOR XML PATH('')
)
,1,1,'') AS recipient,
[Message].date
FROM
[Message]