| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Nested sort, trying again
-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
![]() |
![]() |