access sql query to concatenate rows

前端 未结 2 457
执念已碎
执念已碎 2020-12-22 05:36

I have following data in csv format which I exported in access format

House Number | Road name | Postcode
1 | alex road | sw2 4r
2 | alex road | sw2 4r
3 | a         


        
2条回答
  •  被撕碎了的回忆
    2020-12-22 06:04

    because there is no such function like group_concat in Access. so I import my csv file into phpMyAdmin mysql database using its built in import tool and use following query to group them

    SELECT  road,pcode, group_concat(house_number) 
    FROM mytable
    GROUP BY road, pcode
    

    and then later export it back to csv using phpmyadmin built in export tool. I don't know if there is a better way of doing this.

提交回复
热议问题