I regularly have to mass update customers address areas when the postcode lookups for those areas are altered. e.g the lookup table can be something like below.I usually do this as a number of runs. first by first normalising the Address postcodes to just have 1 space, then performing the update using a charindex match upto the first space of the Address postcode with the postcode on the lookup file. Then a left$ check to pick up e.g. TA1 2 or GL54 2 but this has to be done on multiple runs because of the number of characters in the lookup. Can you suggest a better pattern match that would pick up all the different postcode lookup styles?Area Code Related Postcode or partial code15 TA1 216 TA1 317 TA1 418 GL5319 GL5220 TQ21 TQ 122 GL54 2
↧