a tough "geneological" Query (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Gax -> a tough "geneological" Query (2/8/2005 4:13:02)

Table = Users

Each record contains a ReferredBy field that tells us who they were referred by.

Bill referred bob, who referred, bill, who referred bubba etc. Some of these can go 20+levels deep.

I want to search by bobs User ID and have it return Bill, Bubba, and everyone else that was a result of his referrals regardless of how many different "generations" it takes.

I have toyed unsuccessfully with some varying methodology. Most of which I really dont like.

Please help.

Gax







BeTheBall -> RE: a tough "geneological" Query (2/8/2005 19:48:51)

Welcome to OutFront. Where there is nothing in the record that identifies the original referrer, I cannot conceive of a way to do what you propose.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.201172E-02