Re: Nested sort, trying again
From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 29 Sep 2005 14:23:54 -0700
Message-ID: <1128029034.952900.34550_at_g14g2000cwa.googlegroups.com>
Date: 29 Sep 2005 14:23:54 -0700
Message-ID: <1128029034.952900.34550_at_g14g2000cwa.googlegroups.com>
Bob Stearns wrote:
> In this case the tree is sorted in the order I want to present it to my
> users. Consider the tree z(y(x,w),v(y(t,s))) which would have a similar
> representation to the first on but which I wish to present to my users as:
>
> z
> v
> u
> s
> t
> y
> w
> x
> The question is: Is there an easy (relatively) way to produce this sort
> without a recursive sql user defined function?
I can't prove that's impossible, but here is some hand waving. Your output sorted the output by materialized path string
z
z.v z.v.u z.v.u.s z.v.u.t
and the only way to produce such materialized path is recursion, or at least, a list aggregate function. Received on Thu Sep 29 2005 - 23:23:54 CEST