Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

UPDATE SQL Query Help ! Expand / Collapse
Author
Message
Posted Thursday, February 20, 2014 10:58 AM This worked for the OP Answer marked as solution


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 7:13 PM
Points: 3,810, Visits: 8,573
It would be as simple as this, as explained in the article:
SELECT t.AID,
Emails = STUFF((SELECT '; ' + t1.EmailID
FROM #TEST1 t1
WHERE t1.AID = t.AID
FOR XML PATH('')), 1, 2, '')
FROM #TEST1 t
GROUP BY t.AID
ORDER BY t.AID




Luis C.
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1543638
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse