ORA-00904: "WMSYS"."WM_CONCAT": invalid identifier (文档 ID 2215183.1)

APPLIES TO:

Oracle Transportation Management Cloud Service - Version 6.4.1 and later
Oracle Transportation Management - Version 6.4.1 and later
Oracle Global Trade Management Cloud Service - Version 6.4.1 and later
Oracle Global Trade Management - Version 6.4.1 and later
Information in this document applies to any platform.

SYMPTOMS

You have an agent which is failing on a Direct SQL in call with error

java.sql.SQLSyntaxErrorException: ORA-00904: "WMSYS"."WM_CONCAT": invalid identifier

 

CAUSE

The database function WM_CONCAT is being used.
 
WM_CONCAT is undocumented and unsupported by Oracle meaning it should not be used in production systems.

This function has been removed from Oracle 12c.

Since version 6.4.1 includes a database update to 12c this function can no longer be used.
 

SOLUTION

The Oracle PL/SQL WM_CONCAT function is used to aggregate data from a number of rows into a single row, giving a list of data associated with a specific value. In effect, it cross-tabulates a comma delimited list. 

WM_CONCAT is gone in 12c.

Use the LISTAGG function instead, which can produce the same output as WM_CONCAT is both documented and supported by Oracle.

Basic Syntax:

LISTAGG(col_name_to_be_aggregated, ',') WITHIN GROUP (ORDER BY col)

Def LISTAGG http://psoug.org/definition/LISTAGG.htm

 

http://stackoverflow.com/questions/11510870/listagg-in-oracle-to-return-distinct-values

http://dba.stackexchange.com/questions/696/eliminate-duplicates-in-listagg-oracle
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值