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.>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 >