Home » SQL & PL/SQL » SQL & PL/SQL » Concat SQL results
Concat SQL results [message #246935] Fri, 22 June 2007 09:40 Go to next message
Messages: 1
Registered: June 2007
Location: Guyana
Junior Member

Hello there,
I don't know if this is possble. It may reduce my work if someone can give me some tips here.

Question: Could I concat results from an sql into a single string?

Example: A query of names brought up the following records

select name
from table_names;

Michael James
Michael Singh
Michael John

Could I have all those names joined together and returned from the query as "Michael James Michael Singh Michael John" ?

I have ruled out the option of a PL/SQL cursor by running a loop and appending them to one variable.

Re: Concat SQL results [message #246937 is a reply to message #246935] Fri, 22 June 2007 09:50 Go to previous messageGo to next message
Messages: 24958
Registered: January 2009
Location: SoCal
Senior Member
search for "pivot query"
Re: Concat SQL results [message #246950 is a reply to message #246935] Fri, 22 June 2007 10:44 Go to previous message
Michel Cadot
Messages: 63912
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Previous Topic: Inserting values
Next Topic: Proper way to create this procedure
Goto Forum:

Current Time: Sun Oct 23 19:16:34 CDT 2016

Total time taken to generate the page: 0.08699 seconds