LISTAGG alternative in Oracle 10g

后端 未结 4 1912
轻奢々
轻奢々 2020-12-19 12:57

I am kind of newbie in Oracle. Got stuck in the below: I have the below 2 tables:

Site:

**SiteID|SiteName** 
1      Sydney
2      Ne         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-19 13:18

    I think I am close to it, just need a small help: I have created a function GetSiteName, which returns the site name against the SiteID. Now I am using the below xmlagg where in I need to call this function GetSiteName:

    select PeopleID, rtrim (xmlagg (xmlelement (e,  clint.GetSiteName(SiteID)   || ',')).extract ('//text()'), ',') SITEIDS
    from client.People group by    PeopleID;/
    

    Basically need help in calling the function from inside xmlagg, any thoughts?

提交回复
热议问题