For SQL Server you can use FOR XML PATH() statement to achieve that.
http://databaseandstorage.blogspot.com http://gotodba.weebly.com
Forum Rules