This content has been marked as final.
Show 5 replies
-
1. Re: am getting error error when am using wm_concat funcation.
Lokanath Giri Jan 10, 2012 7:25 AM (in response to 883038)wm_concat is un-documented hence not supported by oracle.1 person found this helpful
Try some alternative
Some good example available check this.select rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enames from emp where deptno=30
http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php
Edited by: Lokanath Giri on १० जनवरी, २०१२ १२:५४ अपराह्न -
2. Re: am getting error error when am using wm_concat funcation.
Jhon Jan 10, 2012 6:06 AM (in response to 883038)correct name of ur Function:1 person found this helpful
SELECT lengt(ename) FROM EMP WHERE deptno=10;
ORA-00904: "LENGT": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 8 Column: 7
SELECT length(ename) FROM EMP WHERE deptno=10;
it return rows sucessfully -
3. Re: am getting error error when am using wm_concat funcation.
AlexAnd Jan 10, 2012 6:11 AM (in response to 883038)>1 person found this helpful
WM_CONCAT is undocumented and unsupported by Oracle, meaning it should not be used in production systems.
>
so change your way
btw
for me
try wmsys.wm_concatSQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod PL/SQL Release 10.2.0.1.0 - Production CORE 10.2.0.1.0 Production TNS for 32-bit Windows: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production SQL> set serveroutput on SQL> DECLARE 2 ex varchar2(200); 3 BEGIN 4 SELECT wm_concat(ename) INTO EX FROM EMP WHERE deptno=30; 5 DBMS_OUTPUT.PUT_LINE(EX); 6 END; 7 / ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES PL/SQL procedure successfully completed. SQL> -
4. Re: am getting error error when am using wm_concat funcation.
cool-2466583 Jan 10, 2012 7:50 AM (in response to 883038)Hi,1 person found this helpful
Please check the database version you are using.
wm_concat is available from 11g Release 2.
Regards,
Wilson -
5. Re: am getting error error when am using wm_concat funcation.
BluShadow Jan 10, 2012 9:08 AM (in response to cool-2466583)Cool wrote:
Incorrect.
Hi,
Please check the database version you are using.
wm_concat is available from 11g Release 2.
wm_concat is undocumented and shouldn't be used.
Even Tom Kyte says so... Re: DISTINCT not working with wmsys.wm_concat
From 11gR2, there is a new documented function called LISTAGG...
http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions089.htm
