Може би нещо подобно (ако използвате MSSQL 2005+):
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]