SQL Multiple Left Outer Join
Posted: Thu Oct 31, 2002 11:53 am
I can create a single Left Outer Join, however I am having trouble creating multiple left outer joins. The Select statement below sample B, work when I pass it in my application however I have only been able to do sample A in R&R____sample A__select Prospect.prospect_id,__LType.meaning LMeaning __ from Calls, {oj Prospect __ left outer join lookups LType__on Prospect.living_type = LType.lookup_code }__ where Prospect.l_city like ^Warren^__ and Calls.Prospect_id = Prospect.Prospect_id____sampele B__select Prospect.prospect_id,__LType.meaning LMeaning,__BType.Meaning BMeaning, __IType.Meaning IMeaning,__CType.Meaning CMeaning, __UType.Meaning UType, __MType.Meaning MType,__campus.description CampsDesc __ from Calls, Prospect__left join lookups LType__on Prospect.living_type = LType.lookup_code and LType.Lookup_type = ^Living Type^ __left join lookups BType__on Prospect.building_type = BType.Lookup_Code and BType.Lookup_Type = ^Building Type^__left join lookups IType__on Prospect.inquiring_for = IType.Lookup_Code and IType.Lookup_Type = ^Inquiring For^__left join lookups CType__on Prospect.currently = CType.Lookup_Code and CType.Lookup_Type = ^Currently^__left join lookups UType__on Prospect.unit_type = UType.Lookup_Code and UType.Lookup_Type = ^Unit Type^__left join lookups MType__on Prospect.must_sell = MType.Lookup_Code and MType.Lookup_Type = ^Must Sell^__left join campus__on Prospect.campus = campus.campus__ where Calls.Prospect_id = Prospect.Prospect_id__