Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outer Join in SQL
Message
From
28/04/2000 16:03:00
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
28/04/2000 14:43:45
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00364597
Message ID:
00364661
Views:
20
Tamar,

That worked, but I also need to have the UCnCnMet.iOrder to be 1, I only need the first contact record for the patient.

Any idea how I can do this?

TIA

Rex

>>LEFT JOIN Impact!UCnCnMet ;
>> ON UCnCnMet.iContactId = UContact.iId ;
>>INNER JOIN Impact!SCntMeth ;
>> ON SCntMeth.iId = UCnCnMet.iContactMethodId ;
>
>You haven't said what results you're getting, but I suspect the problem is in the lines I quoted. Once you use an outer join, you generally need all the joins that follow it logically to be outer joins as well. Otherwise, the records that were added by the outer join get dropped by the subsequent joins because they don't match up to anything in the tables that are added in the later joins. Try changing the join with SCntMeth to a LEFT JOIN.
>
>Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform