Possible Duplicate:
Sql select group by and string concat
My SQL table looks like this:
City_Code Post_Code Post_Code_Description
100 A1 ABC
100 C8 XYZ
100 Z3 MNO
200 D4 LMN
300 E3 IJK
300 B9 RST
It's a mapping between city_code
and Post_Code
. One City_Code
can have many Post Codes
. Now I want to run a query to get something like this:
City_Code Post_Code Post_Code_Description
100 A1,C8,Z3 ABC,XYZ,MNO
200 D4 LMN
300 E3,B9 IJK,RST
Can you please help me with this?