Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Creating ; seperated data

$
0
0

I have a table that has a bunch of ids and email addresses.  I want to query the table and return the email addresses separated by semi colon so I can feed it into an email.  Is there an easy way to to this?

For example

CATEGORY    EMAIL
A                  Smith@somewhere.com
C                  Jones@somewhere.com
A                  Bob@somewhere.com
C                  John@somewhere.com
C                  Tom@somewhere.com

Needed result (where Category=C)
Jones@somewhere.com; John@somewhere.com; Tom@somewhere.com


 

Jim



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>