I've a table of cust ids where one customer can have multiple services (e.g. svc1, svc2, svc3). One cust id record contains one servicename field. So there can be duplicate cust records.
e.g.
custid servicename
------ -----------
1 svc1
1 svc2
2 svc3
2 svc4
3 svc1
3 svc5
4 svc1
4 svc2
4 svc3
Desired output:
custid servicename
------ -----------
1 svc1:svc2
2 svc3:svc4
3 svc1:svc5
4 svc1:svc2:svc3
How do I concatenate the servicename field of these duplicate records into one field?
Appreciate your help. Thanks
Mike
e.g.
custid servicename
------ -----------
1 svc1
1 svc2
2 svc3
2 svc4
3 svc1
3 svc5
4 svc1
4 svc2
4 svc3
Desired output:
custid servicename
------ -----------
1 svc1:svc2
2 svc3:svc4
3 svc1:svc5
4 svc1:svc2:svc3
How do I concatenate the servicename field of these duplicate records into one field?
Appreciate your help. Thanks
Mike
Comment