Merging two tables
Posted on 2005-04-21
I have two tables. One table has city, state, zip. The other table has city, state, population.
Many records in the two table has the same city and state. I would like to merger the two tables. For each 2 records that has the same city and state, I would like to eliminate 1 of them but keep all related date city, state, zip and population.
And the records that are not duplicate can be kept. So the final table will have 3 groups of records
1. Has city, state, zip, no population
2. Has city, state, no zip, population
3. Has city, state, zip, population
Is there a SQL script (or ASP script) that I can run to do the above job?