Subject Re: How to select all child records of a given parent in a self referencing table
Author Erik De Laet
> create procedure sp_tree (spid integer) returns (id integer, pid integer) as
> begin
> for select id, pid from tree where pid=:spid into :id, :pid do
> begin
> suspend;
> for select id, pid from sp_tree(:id) into :id, :pid do
> suspend;
> end
> end
> ^
>
> than: select * from sp_tree(0);

Thank you very much, this works as a charm !

While I have read Helen's book completely when I bought it (a couple of years back), it never occured to me (now that I needed it), that I could call a stored procedure recursively.

What a great community ... thanks again.