High Five - I did the exact same thing but with patient health records in preparation for linking to the NHS spine.
I also had to perform a lot of filtering and fixing of postcodes - including SO and many other combinations. The number of UPDATE queries just grew and grew.
I was doing this in about 1982 - and on a "database" that was more of a custom file system accessed by routines written in-house in assembler
and only accessible in COBOL68
why was a rather rude introduction to the world of programming
(and I could "entertain" you with stories about how it got worse for hours!!"
so UPDATE queries would have been a massive luxury at the time!!