September 25, 2010 at 10:10 am
Hi There,
I'm creating MLM software. I'm stuck on sharp sql curve. I've created tables. Now I need to fetch records count. I'm attaching screen shots of two tables. I'm inserting records in both tables.
I need to count all child nodes available in X leg and Y leg under ParentId. like
1 (It has 6 Child nodes : Left = 3, Right = 3)
2 (It has 2 : Left = 2, Right = 2) 3 (It has 2 : Left = 2, Right = 2)
4 5 6 7
Sorry for Bad way of presentation.
Please help me out.
Regards,
Tushar
September 27, 2010 at 9:31 am
please give us a clear description if you want the problem to be solved.
I do not understand even a single thing to ask questions to solve the problem.
It looks like an abstract question asked by an artist to a viewer.
September 28, 2010 at 9:15 am
Hi,
Sorry for inconvenience. I need to count all child nodes for one user. Here I'm attaching an image, it has node up to 4 levels but I need nodes count till 12 levels.
I need two counts for main user: left count and right count.
In original post I've uploaded two screenshots of database tables, which I'm using for registration.
Is it clear enough ? if not I'll try once again.
Regards,
Tushar Jindle
September 28, 2010 at 9:36 am
I'd like to suggest that you read the first (or first two) links in my signature. Then, instead of those images, please post some CREATE TABLE and INSERT statements to give us what is in the graphics. And finally, based upon the sample data supplied, provide what the expected results are.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
September 28, 2010 at 10:43 am
Hi,
Please find attached Image. I forgot to attach in previous post.
Regards,
Tushar Jindle
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply