Link to home
Start Free TrialLog in
Avatar of therealdreamer81
therealdreamer81

asked on

Concatenate string using Group By

How do I concatanate strings with MSSQL?

e.g. table values:
cGroup  cText
A           L
A           M
B           V

query:
select cGroup, concat(cText) as cTextConcat
from myTable
group by cGroup

Result set:
cGroup cTextConcat
A         LM
B         V
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
AngelllI - v.v.v. cool solution....
Forced accept.

Computer101
Community Support Moderator