Re: Use on group_concat Hi Prasad,
As you said there is no pre definied function (like GROUP_CONCAT in mysql) available in MS-SQL or Oracle.
for MS-SQL we need to use stored function / precedure to get the result as desired. There is no direct function available for group_concat in oracle also.
CREATE OR REPLACE TYPE ntt_varchar2 AS TABLEOF VARCHAR2(4000);
select deptno, cast(collect(ename) as ntt_varchar2) as vals from emp group by deptno
I tried your points in oracle, but it throws error like this...
ORA-00904: "COLLECT": invalid identifier
Can u please clarify ?
__________________ Keep smiling... |