Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What to use to join unrelated tables?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01139715
Message ID:
01139781
Vues:
15
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>
>I want to find all patients from our Live tables whose names don't match names in Stage tables. I can join based on cSSN and dDOB when both fields have data in them.
>
>In other words, something like:
>select SN.cf_Name as cStage_fName, ;
>SN.cl_Name as cStage_lName, SN.cm_Initial as cStage_mInitial, ;
>NA.cf_Name, NA.cl_Name, NA.cm_Initial, NA.cNames_pk, PN.cSSN. PN.dDOB ;
>from Stage_Patients inner join Stage_Names SN on ...
>inner join Patients on ??????
>inner join Names NA on Patients.cPatiens_pk = NA.cPointer_fk
>.....
>
>I'm a little bit concerned about joining stage and life data tables. I want to join by SSN and dDOB when both have values. Should I put this into JOIN? Or I somehow can use WHERE instead?

With INNER JOIN it doesn't make a difference if you put check for not empty SSN and dDOB into JOIN or WHERE.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform