Subject Re: [firebird-support] nesting - weight calculation
Author Tim Ward
On 29/01/2015 12:29, 'checkmail' check_mail@... [firebird-support] wrote:
 
Is there a simpler statement possible than my stored procedure (recursive)

Oooh, it's the "transitive closure of sparse connectivity matrix" problem again. (With, in this case, the arcs of the directed graph being weighted.) Same problem as "given this table of people, find all the ancestors/descendants of such-and-such". Or, in other words, "SQL isn't that good at tree structures, you have to get a bit clever". (The other main thing I've found, over the decades, that SQL is not very good at being time series.)
-- 
Tim Ward