Soft | Revision |
1 | 1 |
1 | 2 |
1 | 3 |
2 | 2 |
2 | 4 |
3 | 5 |
Select Soft , LEFT(Revision , LEN(Revision)-1) as Revision
FROM
(
Select Soft,
( Select Convert(VARCHAR,Revision)+',' from tblName x where x.soft= y.soft
for xml path('')
) as revision
from tblName y
group by soft
)ask
output
Soft | Revision |
1 | 1,2,3 |
2 | 2,4 |
3 | 5 |
No comments:
Post a Comment