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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Nested sort, trying again

Re: Nested sort, trying again

From: vc <boston103_at_hotmail.com>
Date: 8 Oct 2005 17:16:50 -0700
Message-ID: <1128817010.256106.274500@z14g2000cwz.googlegroups.com>

-CELKO- wrote:
> Frederic Brouard has a great article on using a recursive CTE to build
> the path:
>
> http://www.sqlservercentral.com/columnists/fBROUARD/recursivequeriesinsql1999andsqlserver2005.asp

Unfortunately, his example does not produce the full path, his 'path' is actually just a concatenation of (parent, child) names. One does not need a recursive query to build this kind of path, a simple self-join would suffice (pls. see 5 - Hierarchical indentation).

There is another, more serious, problem with the example. In order, "to view the data as a tree", he assigned the vehicle names in the level order which made the view possible. CTE, by itself, without the trick cannot produce such view.

I tried to post feedback on the websitte, but did not manage to register. Received on Sat Oct 08 2005 - 19:16:50 CDT

Original text of this message

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