Left outer join

Posts   
 
    
Sweety
User
Posts: 12
Joined: 21-Aug-2007
# Posted on: 17-Oct-2007 06:29:48   

Can anybody please help me with the Left outer join.Here I have to get values from three tables using Left Outer join.Please help me to write the below code in LLBL.


SELECT   Company.CompanyID, Company.Name, Company.StateID,Company.CountryID,   State.Name AS StateName, Country.Name AS CountryName
FROM      Company LEFT OUTER JOIN State ON Company.StateID = State.StateID LEFT OUTER JOIN Country  ON Company.CountryID = Country.CountryID


Thanxs.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 17-Oct-2007 11:29:05   

Use a dynamicList to Display fields from more than one table. And to do so you will need to supply the relations between those tables (RelationCollection). When adding a relation to a relationCollection, there is an override to the relationCollection.Add() method that accepts a JoinHint enum value.