June 20, 2007 at 11:58 am
I have a table that is storing comments something like
DocID Cid comment
1 1 'some comment here'
1 2 'another comment here'
2 3 'again a comment'
2 4 'and again you get the picture'
There can be any number of comments and I don't have any control over how they are stored. I am trying to write a select statement that will return the comments for each DocID as a single field. How could I accomplish this?
June 20, 2007 at 12:12 pm
have a look at http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=372987#bm373380
With sql2005 you have the advantage of using varchar(max) for concatenating this kind of text-columns.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply