Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: help with a recursive SQL query
On Thu, 10 Nov 2005 16:12:12 -0800, Jeff Calico wrote:
> What is the most efficient way to do this? I don't know how many
> ancestors a given record will have; I expect it will be different
> for each record.
>
The 'Oracle' way of doing this is a SELECT with a CONNECT BY clause. Choose the 'beginning parent' using the START WITH qualifier.
Lots of results on 'SELECT CONNECT BY' using Google. <g> Received on Thu Nov 10 2005 - 18:21:37 CST