Re: [firebird-support] nesting - weight calculation

2015-01-30 Thread Tim Ward t...@telensa.com [firebird-support]
On 29/01/2015 12:29, 'checkmail' check_m...@satron.de [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

[firebird-support] nesting - weight calculation

2015-01-29 Thread 'checkmail' check_m...@satron.de [firebird-support]
Hello, there is a table with all Material (stock), each one has a number. Now, in a second table there is listed the material that is a part of the Material. For example: Material ABC Material BCD Material XXX Material OMV Material KOM Material OMV can be a Part of XXX and XXX

RE: [firebird-support] nesting - weight calculation

2015-01-29 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
there is a table with all Material (stock), each one has a number. Now, in a second table there is listed the material that is a part of the Material. For example: Material ABC Material BCD Material XXX Material OMV Material KOM Material OMV can be a Part of XXX and XXX a Part of

Re: [firebird-support] nesting - weight calculation

2015-01-29 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
There is at least a good alternative, Frank Ingermann showed how to do something very similar when calculating the amount of ingredients required when baking a marble cake at a Firebird conference a few years ago. He used a recursive CTE. Whether a recursive CTE is simpler than a recursive