oracle 重复的行就显示一行的数据

2025-04-08 09:22:40
推荐回答(1个)
回答1:

select xfjid,substr(max(sys_connect_by_path(jsbmmc,';')),2)
from (
select xfjid,jsbmmc,row_number() over(partition by xfjid order by xfjid) cs from xf_ywbl where fsfs='1' and xfjid = '41642'
) start with cs=1 connect by  cs  = prior cs+1
and  xfjid = prior xfjid
group by xfjid

 

类似这个样子??