At 7:27 AM + 2/27/08, Thufir wrote:
I'm reading "SQL for dummies" and one of the more interesting sections
was on recursion. The example query was something like:
WITH RECURSIVE
ReachableFrom (Source, Destination)
AS (SELECT Source, Destination
FROM FLIGHT
UNION
SELECT in.
I'm not aware of MySQL supporting this feature. Microsoft does and calls
it "common table expression" (CTE). The UNION is necessary as this the
part that links the anchor query, Part1 of the UNION to the recursive
query, Part2. Part2 of the UNION must reference the produced temporary
table called "
Mike,
>What I'd love to do is pull all children (and grandchildren, etc) per
>each, such that I'd end up with the following result set or something
See http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html
for theory & examples.
PB
Mike Johnson wrote:
This one may end up dead in
Amer,
It's still worth storing the parentId, because you can easily recreate the
fullpath if (when!) your code screws up a set of full paths. You can also
write a reliable sanity checker that checks the full path of all the nodes
in the table based on the parentids.
Also, to locate multiple chil
> Subject: RE: Recursion
>Date: Wed, 12 Feb 2003 09:36:11 -
>From: "Andy Eastham" <[EMAIL PROTECTED]>
> To: "Mysql@Lists. Mysql. Com" <[EMAIL PROTECTED]>
>
> Rob,
>
> This is a common problem in document mana
ailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 11:36 AM
To: Mysql@Lists. Mysql. Com
Subject: RE: Recursion
Rob,
This is a common problem in document management, where I have a reasonable
amount of experience.
Unfortunately, the short answer is, that to be completely generic, efficien
Rob,
This is a common problem in document management, where I have a reasonable
amount of experience.
Unfortunately, the short answer is, that to be completely generic, efficient
and elegant, it's a bit of an impossible problem.
What we have always done in this situation is to maintain an additi