Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing duplicate Columns in View's SQL
Message
From
24/06/2009 17:43:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Removing duplicate Columns in View's SQL
Miscellaneous
Thread ID:
01408243
Message ID:
01408243
Views:
88
I've created a view to use for a report based on a Parent - Child - Grandchild arragement. I'm able to retreive the correct resultset.

I need to count each parent's children and sum certain field values that also belong to each parent's children. In some cases, a parent's child may have more than one child (grandchild) and that's were I'm having difficulty. When a child has more than one child(grandchild), the resultset contains more than the actual number of children as follows:

Parent1 - Child1 - Grandchild1
Parent1 - Child1 - Grandchild2

In the above case there is actually only one parent and only one child, but, because the child has two children(grandkids), it causes "duplicate" parents and children.

The report prints correctly. The "duplicate" parents and children do not print, but both the count and sum vars double their results. For example in the above case, the Child1 count ends up being 2 instead of 1 and the summed values that should be 0.05 are 0.10. I'd appreciate any and all ideas on how to resolve this issue.
Next
Reply
Map
View

Click here to load this message in the networking platform