Avatar of rowfei
rowfei

asked on 

How to combine several value in SQL

Hi,

How can I combine serval lines' comments value if the line number more than 1? Need it in SQL statement.

Below is the current data output:

ID        Line     Type   Comment
23         1           A         This is
23         2           B          Test
24         1           C          Testing
25         1           B          Testing


Below is what I want to display:

ID        Line     Type   Comment
23         1           A         This is Test
23         2           B         This isTest
24         1           C          Testing
25         1           B          Testing


Thanks in advance.
Microsoft SQL Server 2005Microsoft SQL Server 2008SQL

Avatar of undefined
Last Comment
Arifhusen Ansari

8/22/2022 - Mon