一直在 oracle 11g上写脚本,突然现场说有个存储 现场无权限执行,
查了一下 原来现场用的 oracle 12C,
找到报错行 wmsys.wm_concat() 报错,
百度一下才知道 oracle 12C已经不支持这个函数了。
看了其他人的博客,记录一下,省的忘了:
原文地址:
http://blog.itpub.net/31392094/viewspace-2149577/
或者
https://www.cnblogs.com/ZhenV5/p/13322773.html?utm_source=tuicool
最后采用的 LISTAGG( )函数 替换原有函数
对比如下:
select to_char(wm_concat(bm)) name from bm_yhbm;
select listagg(bm, ‘,’) within group (order by bm) AS bm from bm_yhbm;