I used this guy's model before without much trouble.
http://www.intelligententerprise.com/001020/celko.jhtml;jsessionid=Y34B5ELGNJP1GQSNDLRCKH0CJUNN2JVN?_requestid=374630

Joe Celko is the man!

Greg

On 5/17/07, Rey Bango <[EMAIL PROTECTED]> wrote:
>
> Guys, its been awhile since I've done tree/hierarchical SQL manipulation
> so I need some help. The data looks something like this:
>
> parent_member_id        member_id       Level
>         1       2       1
>         1       3       2
>         2       4       1
>         3       5       1
>         4       6       1
>         4       7       2
>
> In this scenario, I would be trying to find all downline members of a
> specific parent id. For example:
>
> If I wanted to see all downline members for parent_member_id 1, it would
> be:
>
> 2,3,4,5,6,7
>
> If I wanted to see all downline members for parent_member_id 2, it would
> be:
>
> 4,6,7
>
> If I wanted to see all downline members for parent_member_id 3, it would
> be:
>
> 5
>
> If I wanted to see all downline members for parent_member_id 4, it would
> be:
>
> 6,7
>
> Any guidance on this would be helpful. I've tried Googling this but to
> no avail.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278541
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to