Patron Postal Code Clean-Up Scripts

These scripts can be used to identify incorrect postal codes - i.e. ones where the wrong city is applied, or details are misspelled - and delete/replace them in addresses.

The “…Mismatches” script looks for the postal code entry most used, and lists it with other entries sharing the same code.

The “…Replacement” script will delete any specified postal code entries and replace them with others specified.

Patron - Postal Code Mismatches.sql (2.2 KB)
Patron - Postal Code Replacement.sql (5.1 KB)

2 Likes

Hooray! The cleanup is a HUGE pain to do in the Sys Admin tool because it loads up the entire postal database when replacing a code which typically locks up the UI. Highly recommend you consider something like these scripts if you have a big cleanup job to do.

Also, A+++++ on wrapping everything in a transaction and requiring the manual COMMIT or ROLLBACK. Makes my :heart: happy!