Pure SQL transitive closure with LEVEL
From: Serg <gerg_at_ncom.ru>
Date: 25 Nov 2002 04:45:49 -0800
Message-ID: <a9680411.0211250445.267a3c8f_at_posting.google.com>
Date: 25 Nov 2002 04:45:49 -0800
Message-ID: <a9680411.0211250445.267a3c8f_at_posting.google.com>
Hi
I need pure SQL code to compute transitive closure from adjacency
matrix, say table X(ParentID, ChildID). I managed to compute all
ancestor/predecessor pairs, but couldn't
find the way to get a distance (level) between them in same query.
Any ideas?
regards
Serg Levin
gerg_at_ncom.ru
Received on Mon Nov 25 2002 - 13:45:49 CET