with t as
(select wm_concat(cbbmmc) cbbmmc,wm_concat(cbbmid) cbbmid,substr(cjrq,6,2) month from DCDB_DJLB_DB a where a.lclx='lzps' and zt='1' and cbbmmc is not null and
substr(cjrq,0,4) = 2019
group by substr(cjrq,6,2)
order by month desc)
select regexp_substr(cbbmmc, '[^,]+', 1, rownum) cbbmmc,
regexp_substr(cbbmid, '[^,]+', 1, rownum) cbbmid,
month
from t
connect by rownum <= length(regexp_replace(cbbmmc, '[^,]+')) +1
其中 t的查询结果为
这个语句查询之后
为什么第二条就不拆分了,只显示了空?
查询结果如图
请大神帮忙看看。