Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Join six tables with single SELECT statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01316996
Message ID:
01317194
Vues:
16
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.



>I was wrong. Your WHERE condition doesn't make any sense if you want to use FULL JOIN for all tables. What are you trying to acomplish?
>
>>
>>Are you telling me "No" it can't be done, or it can't be done the way I currently have my statement?
>>
>>You say I should move my condtions from the WHERE tot he JOIN(s), does that mean I have specify my criteria in each join condition along with the join condition like so:
>>
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform