SQL Server update qual geo hash update paf_place set qual_geo_hash=dbo.shahash(lower(qual_geo_name)) For postcodes, set qual_geo_name to just the postcode update PAF_PLACE set QUAL_GEO_NAME = NORM_GEO_NAME, QUAL_GEO_HASH=dbo.shahash(lower(NORM_GEO_NAME)) where PLACE_TYPE = 2; update paf_place set qual_geo_hash=dbo.shahash(lower(qual_geo_name)) where PLACE_TYPE = 2;