How to Use COLLECT with VARCHAR2 Oracle 10g
问题 I'm trying to get the COLLECT function to work for me. I'm using 10g and therefore found that LISTAGG and WM_CONCAT will not work (invalid identifier errors). The data I have is for example as follows. Order Lot 123 A23088 123 A23089 089 AABBCC 305 120848 305 CCDDYY What I need returned is as follows Order Lot 123 A23088, A23089 089 AABBCC 305 120848, CCDDYY Using the following, I get the error: TO_STRING is an invalid identifier TO_STRING ( CAST(COLLECT(DISTINCT LOT) AS varchar2(100)) ) AS