Subject Re: sql problem
Author duilio_fos <irel_llc@libero.it>
> a table is structured like a linked list:

I found the solution.

I enclose it below, in the case somebody is interested.

Duilio Foschi

CREATE PROCEDURE PathBack(aId integer)
RETURNS
(id integer )
as
begin
for select distinct to_id from ATable a, ATable b where
a.fm_id=b.to_id or to_id=:aId
into id
do
begin
suspend;
end
end;