我有一个下面表格的查询,我需要它按某个列进行分区,但是当我这样放置它时,它给了我错误:from keyword not found where expected
Select distinct t_name, rtrim(xmlagg(xml element(e, text, ',').extract('//text()') order by c_id).getclobval(), ',' ) over (partition by t_name) col_list from all_cls where schema ='a' and table in ('tableA' , 'tableB')
有什么问题,我该如何解决它,以便它与 xmlagg 一起正常运行,就像下面的 list agg 查询一样:
Select distinct t_name, listagg(text ',' ) within group(order by c_id) over (partition by t_name) col_list from all_cls where schema ='a' and table in ('tableA' , 'tableB')