Hi Loralee,
I have no idea who invented INNER JOIN syntax, but I really wish they hadn't.
This is SO much clearer:
SELECT p.LegalName, ch.[CHDP Status], c.City, p.PracticeNum
FROM tblCHDPStatus ch, tblPractice p, tblCity c
WHERE ch.CHDPStatusID=p.CHDPStatusID
AND c.CityID=p.CityPM177ID
AND p.LegalName IS NOT NULL
ORDER BY p.LegalName, p.CityPM177ID, c.City
I havn't tested it, so I'm not sure it gives you what you want, but ALL "inner join" syntax SQL statements can be written so much more easily by using WHERE clauses. Also, table aliases really simplify your script, and avoid field names with spaces at any cost.
If the above doesn't work, let me know an I'll tweak it.
HTH,
Bob
|