Re: recursive to tree conversion?
Posted in 1996
In article <31AB5832.5563@sigg.com>, Robert Donat <rdonat@sigg.com> wrote: >Has anyone written a procedure or ESQL program which converts a >recursive table (ie employee/supervisor) into a tree structure type >table (ie left/right [in/out], level)? Well, I'm sure someone has. The >question is does anyone know where I might look at such code? Platform >independent. Makes no difference to me. There are some *very* nice algorithms for representing hierarchical structures in a relational database using only base SQL92 features (without cursors or recursion), which I have had great success with in the past. I would recommend reading "SQL for Smarties" for some examples. If there is sufficient interest, I can provide some examples. -scott -- Scott C. Gray gray@voicenet.com Sybase Professional Services scott.gray@sybase.com http://www.voicenet.com/~gray/sqsh.html