CONNECT BY / START WITH query to count "families"
- From: trippknightly@xxxxxxxxxxx
- Date: 27 Sep 2005 13:19:13 -0700
Suppose I have a table that contains Account# & RelatedAccount# (among
other things).
How could I use CONNECT BY & START WITH in a query to count
relationships or families.
For example, in
ACCT REL_ACCT
Bob Mary
Bob Jane
Jane Bob
Larry Moe
Curly Larry
there are 2 relationship sets (Bob,Mary,Jane & Larry,Moe,Curly). If I
added
Curly Jane
then there'd be only 1 larger family. Can I use CONNECT BY & START
with to detect such relationships and count them? In my case I'd be
willing to go any number of levels deep in the recursion. Am open to
other suggestions as well.
Thx
- TK
.
- Follow-Ups:
- Re: CONNECT BY / START WITH query to count "families"
- From: mikharakiri_nospaum
- Re: CONNECT BY / START WITH query to count "families"
- From: BigBoote66
- Re: CONNECT BY / START WITH query to count "families"
- From: Vadim Tropashko
- Re: CONNECT BY / START WITH query to count "families"
- Prev by Date: Re: Analytics/update question
- Next by Date: Re: Analytics/update question
- Previous by thread: Accessing heterogenous data from Oracle/AIX
- Next by thread: Re: CONNECT BY / START WITH query to count "families"
- Index(es):
Relevant Pages
|