John
Iv'e used ansi join syntax for so long now I forgot this was the way we
used to do it!
In mssql it would be
SELECT cl.*,
sub.Type,
c.City,
s.StreetName
FROM TClient cl JOIN
TSubs sub ON cl.ID = sub.ID LEFT OUTER JOIN
TCity c ON cl. CityName = c.ID LEFT OUTER JOIN
TStreet s ON cl. StreetName = s.ID
WHERE
sub.SubType IN(1,2,4,5)
AND cl.Active = true
HTH
Hi all
How can I translate the following sql into one using LEFT OUTER JOIN
on the tables TCity and TStreet? This to get all records of TClient
including the once that do not have a relation with TCity or TStreet.
SELECT cl.*,
sub.Type,
c.City,
s.StreetName
FROM TClient cl,
TSubs sub,
TCity c,
TStreet s
WHERE cl.ID = sub.ID
AND cl. StreetName = s.ID
AND cl. CityName = c.ID
AND sub.SubType IN(1,2,4,5)
AND cl.Active = true
Thanks for your help
John
------------------------------------------------------------------------
_______________________________________________
NZ Borland Developers Group Offtopic mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/offtopic
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
_______________________________________________
NZ Borland Developers Group Offtopic mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/offtopic
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe