Basically I have table
with name, address, zip columns and another table with zips and their town names.
I want to get a list of only those town names that have entries in the location db.
This almost works.
Towns with more than one zip get displayed more than once. --
Andy
Code:
location
I want to get a list of only those town names that have entries in the location db.
This almost works.
Code:
select location.zipcode,towns.town,towns.zipcode from location
left join towns on location.zipcode=towns.zipcode
group by location.zipcode having towns.zipcode = location.zipcode
order by towns.town;
Towns with more than one zip get displayed more than once. --
Andy