Using SQL Server 2005.
I have this data:
What would be the SQL to return it like this?
I don't need to keep the seq number, but the comments need to be in the proper order. I don't know if a pivot would work in this case because I don't need to sum anything.
I have this data:
Code:
[b]Order No Seq Comment[/b]
691164 1 This is comment A
691164 2 This is comment B
691164 4 This is comment D
123456 1 Comment X
123456 2 Comment Y
123456 4 Comment Z
What would be the SQL to return it like this?
Code:
[b]Order No Comment 1 Comment 2 Comment 3[/b]
691165 This is comment A This is comment B This is comment D
123456 Comment X Comment Y Comment Z
I don't need to keep the seq number, but the comments need to be in the proper order. I don't know if a pivot would work in this case because I don't need to sum anything.