I need help with the following querty. I need to select all distinct rows from Table W. At the same time, I need to lookup Table P using PropertyID
to display MyAddress if exists in Table P. (Not all records in Table W exist in Table P) Thank you very much.
SELECT DISTINCT(W.MyID), P.MyAddress
FROM dbo.WL W LEFT OUTER JOIN
dbo.PropertyFile P ON W.MyID = P.MyID
LEFT OUTER JOIN
dbo.PropertyFile P1 ON W.PropertyId = P1.PropertyId