I am in a situation where I must list the result of a query return as a coma separated values. A normal select statement results in multiple rows and I want this rows as a single line result. This is fairly easy if I have to write a code but I want it using a database function and since I'm using Oracle I assumed that it may have such feature.
Asked
Active
Viewed 40 times
0
-
1If you're on Oracle 11, the [`LISTAGG` function](http://docs.oracle.com/cd/E11882_01/server.112/e10592/functions089.htm) will do this. If you're on Oracle 10 you may be able to use the undocumented (and unsupported) [`WM_CONCAT` function](http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php) – Ed Gibbs Jul 30 '13 at 14:52
-
I'm on Oracle 10 so pls explain the WM_CONCAT function – altsyset Jul 30 '13 at 15:13