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: 25579
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: 65154
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Previous Topic: Identical records with little time difference
Next Topic: Grabbing most recent data
Goto Forum:

Current Time: Wed Aug 23 10:48:10 CDT 2017

Total time taken to generate the page: 0.04502 seconds