Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What to use to join unrelated tables?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
What to use to join unrelated tables?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01139715
Message ID:
01139715
Views:
66
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?

What do you think?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform