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:
01139835
Vues:
14
>>
>>With INNER JOIN it doesn't make a difference if you put check for not empty SSN and dDOB into JOIN or WHERE.
>
>This gives me an error "Object PA is not found"
>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, ;
>PA.cSSN. PA.dDOB, PA.cPatients_pk ;
>from Stage_Patients SP ;
>inner join Stage_Names SN on SP.cStage_Patients_pk = SN.cPointer_fk ;
>inner join Patients PA on SP.dDOB = PA.dDOB and SP.cSSN = PA.cSSN ;
>inner join Names NA on PA.cPatients_pk = NA.cPointer_fk ;
>where SP.dDOB <> {} and not PA.cSSN = "" ;
>and SN.cf_Name = NA.cf_Name ;
>and SN.cl_Name = substr(NA.cl_Name,2) into cursor curProblems
>
Ok, I spotted a typo in my select.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform