Isn't it something like this ....

SELECT p.id, s.Name, c.City, d.District
 FROM   ((Property p  LEFT OUTER JOIN StreetNames s on s.id = p.Address)
 LEFT OUTER JOIN CityNames s on c.id = p.City)
 LEFT OUTER JOIN DistrictNames s on d.id = p.District

Regards

Sammy !!

----- Original Message ----- 
From: "John Christenhusz" <[EMAIL PROTECTED]>
To: "Multiple recipients of list database" <[EMAIL PROTECTED]>
Sent: Friday, April 06, 2001 2:24 PM
Subject: [DUG-DB]: Multiple outer joint


> Is there any way of defining a multiple outer joint?
> 
> The following returns nicely the property address.
> 
> SELECT p.id, s.Name
> FROM Property p
> LEFT OUTER JOIN StreetNames s
> on (s.id = p.Address)
> 
> 
> But the Property table has also a City and District lookup index.
> 
> How can I define a multiple left outer join:
> something like:
> 
> SELECT p.id, s.Name, c.City, d.District
> FROM Property p
> LEFT OUTER JOIN StreetNames s on (s.id = p.Address)
> and
> LEFT OUTER JOIN CityNames s on (c.id = p.City)
> and
> LEFT OUTER JOIN DistrictNames s on (d.id = p.District)
> 
> 
> Thanks for any help
> 
> John.
> 

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to