开发者

Oracle - Subquery with concat possible?

开发者 https://www.devze.com 2023-01-26 21:59 出处:网络
is it possible to concat the result of an subquery with oracle? if this subquery for an view: (SELECT s.name

is it possible to concat the result of an subquery with oracle?

if this subquery for an view:

  (SELECT s.name
        FROM
            app_shared_servers ass
        LEFT JOIN servers s
            ON (s.srv_id = ass.srv_id) WHERE ass.app_id = a.APP_ID) SHARED_SERVERS

Which returns a list of servernames associated with some kind of system. I need them to display like &qu开发者_如何学JAVAot;Server, Server2, Server3" inside the view.

Any ideas?


this looks like a string aggregation question, see these questions on SO for a description of available methods:

  • Oracle: Combine multiple results in a subquery into a single comma-separated value
  • Add comma-separated value of grouped rows to existing query
  • SQL - Multiple Values comma separated when using GROUP BY
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号