SQL, combining the result

Posted by Newbie on Stack Overflow See other posts from Stack Overflow or by Newbie
Published on 2010-06-13T15:15:56Z Indexed on 2010/06/13 15:22 UTC
Read the original article Hit count: 201

Filed under:
|
|

I am using Access and have this SQL

SELECT land.id, land.official_name, vaksiner.vaksiner
FROM land INNER JOIN (vaksiner INNER JOIN land_sykdom ON vaksiner.id = land_sykdom.sykdom)        ON land.kort = land_sykdom.land
ORDER BY land.official_name

The SQL gives me a result like this:

id    official_name    vaksiner

1     a                A
1     a                C    
2     b                A
2     b                B
2     b                C

But I want to combine the result so that it looks like this:

id    official_name    vaksiner

1     a                A, C
2     b                A, B, C

© Stack Overflow or respective owner

Related posts about sql

Related posts about ms-access