CaptainBob007
Programmer
Hi all -
I'm having a little trouble with a subquery and I'm not sure why. Here's what I'm running:
It comes up with all the results I want, but it doesn't order them. Any ideas as to why would be most appreciated. Thank you in advance.
~Bob
I'm having a little trouble with a subquery and I'm not sure why. Here's what I'm running:
Code:
SELECT DISTINCT tblPermit.PerID,
tblProperty.AddNum & " " & tblProperty.AddStreet AS Address,
tblPermit.Description,
tblPermit.PerNum,
tblProperty.AddStreet,
tblProperty.AddNum
FROM tblProperty INNER JOIN (tblPermit LEFT JOIN tblInsp ON tblPermit.PerID=tblInsp.PerID)
ON tblProperty.PropID=tblPermit.PropID
WHERE NOT tblPermit.PerID IN (SELECT PerID FROM tblInsp WHERE ((InsStatus = "Fail") OR (InsStatus IS NULL)))
ORDER BY tblProperty.AddStreet, tblProperty.AddNum;
It comes up with all the results I want, but it doesn't order them. Any ideas as to why would be most appreciated. Thank you in advance.
~Bob