MEMBER FUNCTION ODCIAggregateTerminate (
self IN strlink,
value OUT VARCHAR2,
flags IN NUMBER
)
RETURN NUMBER
IS
BEGIN
value := self.str;
RETURN ODCICONST.SUCCESS;
END;
MEMBER FUNCTION ODCIAggregateMerge (
self IN OUT strlink,
ctx2 IN STRLINK
)
RETURN NUMBER
IS
BEGIN
NULL;
RETURN ODCICONST.SUCCESS;
END;
END;
------其他解决方案--------------------
select deptno,wm_concat(ename) from emp group by deptno;
DEPTNO WM_CONCAT(ENAME)
------ --------------------------------------------
10 CLARK,KING,MILLER
20 SMITH,FORD,ADAMS,SCOTT,JONES
30 ALLEN,BLAKE,MARTIN,TURNER,JAMES,WARD
------其他解决方案--------------------
恩,这个是可以的,请教一下,我刚刚贴的那个函数str_link是系统自带的吗?
------其他解决方案--------------------
呵呵,是我写sql太大意了,我引用内层循环的变量名字和外层循环判断的字段相同,我改了内层变量名就可以了。
如下:
select city,(
select ***
from table a
where a.city = city)
from (
city,xxxxxxxxxxxxxxxxxxxx
),
重点出错在select ***
from table a
where a.city = city,这会导致死循环,然后,我把内层的city改为citya,然后内层改为
select ***
from table a
where a.city = citya,然后就可以了。 ------其他解决方案--------------------