CONNECT BY / START WITH query to count "families"



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

.



Relevant Pages

  • Re: San Francisco Amateur
    ... Bob Naeye went off to Cambridge. ... Bob Berta is escaping to Michigan. ... you and Jane are not mentioned longingly. ... But he still maintains his membership, ...
    (sci.astro.amateur)
  • Re: Sorting a Text File
    ... >> Johnson, Bob ... >> Anderson, Jane ... >> Jones, Fred ...
    (microsoft.public.vb.general.discussion)
  • Re: Sorting a Text File
    ... > Johnson, Bob ... > Anderson, Jane ... > Jones, Fred ...
    (microsoft.public.vb.general.discussion)
  • Re: Sorting a Text File
    ... > Johnson, Bob ... > Anderson, Jane ... > Jones, Fred ...
    (microsoft.public.vb.general.discussion)
  • Re: Sorting a Text File
    ... >Johnson, Bob ... >Anderson, Jane ... >Jones, Fred ...
    (microsoft.public.vb.general.discussion)