Oracle returning multiple rows in one line
Posted on 2008-09-29
I am trying to find a way to write a SQL statement that will allow me to do the following:
Field 1 Field 2 Field 3
------- -------- --------
a 1 stuff1, stuff 2, stuff 3
Where "Field 3" is a result of another query.
I tried to write this:
Select Field1, Field2, (Select blah from x where x.item = a.item) as Field3
I get the error code ora-01427 when I attempt this. I do not know the size of the return set as it will vary depending on the query call. I don't want to export this to an Excel spreadsheet, or create a table and dump the contents to it and then query it again. Any and all help would be greatly appreciated.
Thanks in Advance,