Concat GROUP BY in Vertica SQL

前端 未结 3 648
北海茫月
北海茫月 2020-12-11 07:24

I need to get a comma separated list of ids as a field for a messy third party api :s This is a simplified version of what I am trying to achieve.

| id | na         


        
3条回答
  •  长情又很酷
    2020-12-11 07:44

    The easiest on the long term is to use one of the official Vertica UDFs to be found on github at https://github.com/vertica/Vertica-Extension-Packages/tree/master/strings_package which provides a group_concat function. The installation procedure is to found in the README, and examples are even provided.

提交回复
热议问题