I have to somehow group up rows while concatenating a certain column, I am not sure how I would go about doing this. The following is an example of what I need.
CREATE TABLE People(
PersonName varchar(100),
PersonAge int
)
INSERT INTO People
SELECT 'bill', 21
INSERT INTO People
SELECT 'harry', 21
INSERT INTO People
SELECT 'wesley', 21
INSERT INTO People
SELECT 'tom', 42
INSERT INTO People
SELECT 'paul', 42
INSERT INTO People
SELECT 'phil', 53
a normal select from this table will produce the following:
bill 21
harry 21
wesley 21
tom 42
paul 42
phil 53
what I need is the following:
bill, harry, wesley 21
tom,paul 42
phil 53
I am not sure if this is possible but it would be really helpful if anyone know how to do it. Thanks in advance.