I've implemented an user defined aggregate function that concates strings as suggested here https://oracle-base.com/articles/mis ... niques.php.
This function works fine in ordinary SELECTs
where run_id in (19586660,19650792)
group by name
but whenever I use it in PIVOT clause
FROM (select a.name,
from d_run_attr a)
FOR (name) IN ('STATUS','WORKLISTNAME') )
I always get
SQL Error: ORA-56902: expect aggregate function inside pivot operation
Could anyone help me and explain what's wrong?
Best regards, Yury
Maybe PIVOT doesn't support user-defined aggregate functions. If you are using 11gR2, you can try LISTAGG. If not, then I suggest you contact Oracle Support for confirmation.
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: https://oracle-base.com
My blog: https://oracle-base.com/blog
Who is online
Users browsing this forum: No registered users and 1 guest