The following code will do the similar functionality of a amount column summation for String data (String concatenation)
SELECT DISTINCT Author, Titles
FROM (select Title, Author from BookStore) a
CROSS APPLY ( SELECT Title + ' '
FROM (select Title, Author from BookStore) b
WHERE a.Author = b.Author
ORDER BY Author
FOR XML PATH('') ) D ( Titles )
Monday, October 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment