Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join six tables with single SELECT statement
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01316996
Message ID:
01317198
Views:
15
Sergey,

I thought I'm using FULL JOIN because I thought I had in order to retrieve all records from both tables if they meet the filter criteria.

Both you and Tamar tell me I have to put what I have in my WHERE clause into the JOIN condition. How do I do that? Do I put the filter criteria in each and every join?

Can you copy and paste my earlier code here and tell me what I'm doing wrong?





>Hi Elgin,
>
>You didn't explain why do you need FULL JOIN. Maybe LEFT JOIN will do?
>
>>The six tables I am trying to join contain different types of test analyses for hundreds of clients. Each table has a CUSTID, UPSINO, and PULDAT, field. I want to use these three fields as the join conditions. I will always specify a single CUSTID, "SC100234" as a filter criteria. For the UPSINO and PULDAT, I may or may not specify some additional filter criteria.
>>
>>For example, in one instance I may want to pull all test results for all dates for a single client, "SC100234". In another instance, and probably most common, I will specify a single CUSTID and a single PULDAT as criteria.
>>
>>The SELECT statement I posted in my earlier entry contained only a few of the fields from each table. I will be adding more fields for each table and a couple more tables.
>>
>>My ultimate goal is to build a "Field Chooser" form in order to build this SELECT statement dynamically. I thought I would work on this SELECT statement first to learn what I am up against in doing this. I know someone has probably already done this in some form or fashion, but I want to do my own version so I can LEARN.
>>
>>As always, thank you for your assistance.
>>
>>
>>
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform