Hello,
I have a table that represents a list of countries. I have another table that represents a list of states. I have another table that represents a list of provinces. Because of poor data definition, some states are actually in the province table and vice-versa. Regardless, each province and state is associated with a country.
I need to essentially do a double left outer join. My question is, how do I do this? Here is what I am currently trying:
select
c.Name as 'CountryName',
ISNULL(p.[Name], '') as 'ProvinceName',
ISNULL(s.[Name], '') as 'StateName'
from
Country c
left outer join [Province] p on p.[CountryID]=c.[ID]
left outer join [State] s on s.[CountryID]=c.[ID]
Please note that I need to do something comparable to two left outer joins. This is a simplified version of the query I'm trying to do. Thank you for your help!