Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> concat data from several rows

concat data from several rows

From: <ndreon_at_my-dejanews.com>
Date: Tue, 30 Jun 1998 23:21:23 GMT
Message-ID: <6nbrtj$bs7$1@nnrp1.dejanews.com>


I have a data records which have a parent record in the same table. Each record has a parent_id column that points to its parent record or is NULL. I want to concatenate the name of a child record with the names of all of its ancestors, something like:

   ... || grand_parent_name || parent_name || name

I can write a PL/SQL function that uses CONNECT BY to do this but I must do it with a single SQL query and the query can not call my function (we are using a very lame COTS product).

Does anyone know a way?

Thanks
Nathan

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Jun 30 1998 - 18:21:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US