Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> concat data from several rows
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
![]() |
![]() |