If you're in PostgreSQL, you might look at the "list" aggregate.

http://archives.postgresql.org/pgsql-sql/2003-02/msg00559.php

=-=-> Jenn Drummond // [email protected]
      Project Developer, Connexions Project (cnx.org)
      Rice University


On Thu, Jun 18, 2009 at 07:05:33PM -0400, Chris Peterson wrote:
> 
> Actually a join would not help here, from what I have looked at, you would
> need to use a stored procedure to create this type of result, or use some
> oracle-only function to do that =)
> 
> Chris
> 
> 
> On 6/18/09 6:45 PM, "Erik Bray" <[email protected]> wrote:
> 
> > 
> > On Thu, Jun 18, 2009 at 2:06 AM, rishikesh<[email protected]> wrote:
> >> 
> >> I have a sub-query which selects some rows from a table. I want to
> >> concatenate these rows in a single row.
> >> 
> >> Example:
> >> 
> >> Column1
> >> Row1
> >> Row2
> >> Row3
> >> Row4
> >> 
> >> I want this result as:
> >> Column1
> >> Row1Row2Row3Row4
> >> 
> >> Looking for a solution with "Single" query
> > 
> > Well, your example is too abstract to provide an actual query, but you
> > would have to use JOINs to do this.
> > 
> > > 
> 
> 
> 
> > 
> 
> !DSPAM:5814,4a3ac85a173581280414281!
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to