need build a string from a table

Giganews Newsgroups
Subject: need build a string from a table
Posted by:  iccsi (inun…@gmail.com)
Date: Tue, 16 Aug 2011

I need a string build from a table, I just wonder is the function best
choice?

the table is like following:

ID    Data
1    Data1
2    Data2
3    Dats3

I need return string like

  Data1, Data2, Data3

I will need the string in my SELECT clause like

Select Field1, myString from MyTable

I was thinking to use dynamic SQL, but it looks like will not work.

Your help and information is great apprecaited,

Replies