Hello,
i have a table which contain two field customer and phonenumber and following record.
Now i want a query for customer-wise phone number with Concatenating . similiar like attached image.
i am using sql server 2012. what would best query to get this result.
for create table and insert record . use following.
Create Table Information (Customer varchar(255),Phone varchar(256)) Go Insert into Information values ('ABC','145454541') Insert into Information values ('ABC','245454542') Insert into Information values ('ABC','345454543') Insert into Information values ('ABC','445454544') Insert into Information values ('ABC','545454545') Insert into Information values ('DEF','135454541') Insert into Information values ('DEF','235454542') Insert into Information values ('DEF','335154543') Insert into Information values ('DEF','435414544') Insert into Information values ('DEF','535454545') Insert into Information values ('GHI','125454541') Insert into Information values ('GHI','225454542') Insert into Information values ('GHI','325454543') Insert into Information values ('GHI','425454544') Insert into Information values ('GHI','525454545') GO