Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
3 table join
Message
 
 
To
16/02/2011 12:35:40
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01500313
Message ID:
01500419
Views:
43
>Thanks for the code but it doesn't seem to give the desired result.
>
>For each PK in main the result should create N records where N = the largest number of matching records in Parts or Tools.
>
>main.pk = 1 has 2 parts records and 1 tools records so there should be 2 records in the result for pk = 1
>main.pk = 2 has 1 parts record and 3 tools records so there should be 3 records in the result for pk = 3
>
>Your query gave 4 records for PK = 1 and 1 record for PK = 2 (and that record didn't find the matching tool record)
>
>It's looking as if I may need to rethink the entire process. My result would be fine if we were to export as an Excel spreadsheet (something we do often) but developing a hard copy REPORT FORM may be problematic.
>
>Thanks again........Rich
>
Rich,

Did you have a chance to look at my suggestion? I assume that FK in both tables are sequential numbers with no gaps (if not, we need to add the numbers per each partition - a bit complex in VFP).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform