Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What to use to join unrelated tables?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01139715
Message ID:
01139837
Views:
11
Try
where SP.dDOB <> {} and not (PA.cSSN == "") ;
>>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
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform