Home » SQL & PL/SQL » SQL & PL/SQL » Concatenating the results (10g)
Concatenating the results [message #320341] Wed, 14 May 2008 14:22 Go to next message
Messages: 96
Registered: April 2007

I need an SQL statement (not a PL/SQL code) to put the results into one record delimited by comma. For example, I have in my table:

Name   ID
 ----   ----
 F      10   
 A      11  
 B      21 
 D      16 
 C       9 
And I have a select statement like:
select Name
from table
where ID < 15;

I want a result like: C,F,A
Please note that there is no comma after A.

Please help.. thanks.

[Updated on: Wed, 14 May 2008 14:24]

Report message to a moderator

Re: Concatenating the results [message #320344 is a reply to message #320341] Wed, 14 May 2008 14:38 Go to previous message
Michel Cadot
Messages: 65138
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Same old question, posted almost every day and the answer is always: search for "pivot" (I'm sure Kevin Meade will be able to post useful links).

Previous Topic: Not able to write the data into output file
Next Topic: How Can I pain the 'tab' in a file
Goto Forum:

Current Time: Fri Aug 18 00:13:00 CDT 2017

Total time taken to generate the page: 0.07026 seconds