SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 OVER PARTITION Help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

masond
Constraint Violating Yak Guru

447 Posts

Posted - 08/12/2013 :  04:14:51  Show Profile  Reply with Quote
Hey guys
I really need your help. For some reason i don’t know what i am doing wrong.
I have got duplicates in my final result set; The duplicates are on my FDMSAccountno.

These columns are derived from my temp table called #final
Fdmsaccountno
Seller_Code
mcc_code
chain_chain_no
Dba_name
se_number
pca
post_code
rolling12
Segmentation

I know i need to do an Over PARTITION
My over partion is as follows, is this correct ?
select
[FDMSAccountNo],
Seller_Code,
mcc_code,
chain_chain_no,
Dba_name,
se_number,
pca,
post_code,
rolling12,
Segmentation,
into #final2
FROM
(
SELECT [FDMSAccountNo]
Seller_Code,
mcc_code,
chain_chain_no,
Dba_name,
se_number,
pca,
post_code,
rolling12,
Segmentation,
ROW_NUMBER() OVER (PARTITION BY [FDMSAccountNo] ORDER BY [FDMSAccountNo] DESC) AS N
from #final
) s
where N=1

masond
Constraint Violating Yak Guru

447 Posts

Posted - 08/12/2013 :  04:25:59  Show Profile  Reply with Quote
My full query is

SELECT
Dim_Outlet.FDMSAccountNo,
Dim_Outlet.Seller_Code,
Dim_Outlet.MCC_Code,
Dim_Outlet.Chain_Chain_No,
Dim_Outlet.DBA_Name,
Dim_Outlet.SE_Number,
Dim_Outlet.PCA,
Dim_Outlet.Post_Code,
sum(Fact_Financial_History_2.hst_sales_amt_R12) as Rolling12
into #accountbuild
FROM Dim_Outlet
left join Fact_Financial_History_2 ON Dim_Outlet.FDMSAccountNo_First9 = Fact_Financial_History_2.hst_merchnum
and ISO_Account = 'N'
and LBG_Account ='N'
and Account_Status = '16'
and MCC_Code not in (
'3351',
'3021',
'4511',
'6011',
'6010',
'6012',
'3502',
'7995',
'7995',
'7995',
'3366',
'3440',
'6010',
'6010',
'3716',
'7995',
'3562',
'6011',
'6010',
'6012',
'3593',
'5964',
'5965',
'5968',
'5969',
'5967',
'5966',
'5962',
'3390',
'6011',
'6010',
'6012',
'6051',
'3505',
'3040',
'3501',
'7280',
'3100',
'3439',
'6051',
'4829',
'6051',
'7995',
'3031',
'6611',
'4112',
'8651',
'3012',
'3136',
'4011',
'8661',
'3542',
'6011',
'6010',
'6012',
'6760',
'3016',
'6211',
'3395',
'7012',
'6051',
'3615',
'9752',
'3018',
'7995',
'4829',
'3722')
and SE_Number is null
group by FDMSAccountNo,
Seller_Code,
MCC_Code,
DBA_Name,
Chain_Chain_No,
PCA,
SE_Number,
Dim_Outlet.Post_Code
having SUM(hst_sales_amt_R12) > 25000




select
Fdmsaccountno,
Seller_Code,
mcc_code,
chain_chain_no,
Dba_name,
se_number,
pca,
post_code,
rolling12,
case
when Post_Code like 'SE1 %' Then 'London SE1'
when Post_Code like 'W1J %' Then 'London W1'
when Post_Code like 'SW1E %' Then 'London SW1'
when Post_Code like 'NW1 %' Then 'London NW1'
when Post_Code like 'SW19 %' Then 'London SW19'
when Post_Code like 'IG10 %' Then 'Loughton'
when Post_Code like 'W8 %' Then 'London W8'
when Post_Code like 'E17 %' Then 'London E17'
when Post_Code like 'E15 %' Then 'London E15'
when Post_Code like 'E3 %' Then 'London E3'
when Post_Code like 'E2 %' Then 'London E2'
when Post_Code like 'N16 %' Then 'London N16'
when Post_Code like 'NW9 %' Then 'London NW9'
when Post_Code like 'E8 %' Then 'London E8'
when Post_Code like 'W13 %' Then 'London W13'
when Post_Code like 'SW8 %' Then 'London SW8'
when Post_Code like 'W12 %' Then 'London W12'
when Post_Code like 'W5 %' Then 'London W5'
when Post_Code like 'SW11 %' Then 'London SW11'
when Post_Code like 'SW3 %' Then 'London SW3'
when Post_Code like 'W2 %' Then 'London W2'
when Post_Code like 'WC2H %' Then 'London WC2'
when Post_Code like 'E1 %' Then 'London E1'
when Post_Code like 'SW6 %' Then 'London SW6'
when Post_Code like 'W6 %' Then 'London W6'
when Post_Code like 'N1 %' Then 'London N1'
when Post_Code like 'EC1M %' Then 'London EC1'
when Post_Code like 'EC2M %' Then 'London EC2'
when Post_Code like 'WC1H %' Then 'London WC1'
when Post_Code like 'W11 %' Then 'London W11'
when Post_Code like 'W10 %' Then 'London W10'
when Post_Code like 'NW2 %' Then 'London NW2'
when Post_Code like 'SW18 %' Then 'London SW18'
when Post_Code like 'NW6 %' Then 'London NW6'
when Post_Code like 'NW8 %' Then 'London NW8'
when Post_Code like 'W4 %' Then 'London W4'
when Post_Code like 'NW3 %' Then 'London NW3'
when Post_Code like 'E14 %' Then 'London E14'
when Post_Code like 'E16 %' Then 'London E16'
when Post_Code like 'N2 %' Then 'London N2'
when Post_Code like 'N20 %' Then 'London N20'
when Post_Code like 'NW11 %' Then 'London NW11'
when Post_Code like 'N6 %' Then 'London N6'
when Post_Code like 'E4 %' Then 'London E4'
when Post_Code like 'SW4 %' Then 'London SW4'
when Post_Code like 'SW10 %' Then 'London SW10'
when Post_Code like 'SW7 %' Then 'London SW7'
when Post_Code like 'TW17 %' Then 'Shepperton'
when Post_Code like 'SW15 %' Then 'London SW15'
when Post_Code like 'E9 %' Then 'London E9'
when Post_Code like 'EC3V %' Then 'London EC3'
when Post_Code like 'WC1B %' Then 'London WC1'
when Post_Code like 'N10 %' Then 'London N10'
when Post_Code like 'W9 %' Then 'London W9'
when Post_Code like 'SE3 %' Then 'London SE3'
when Post_Code like 'W14 %' Then 'London W14'
when Post_Code like 'SE10 %' Then 'London SE10'
when Post_Code like 'SW13 %' Then 'London SW13'
when Post_Code like 'SW5 %' Then 'London SW5'
when Post_Code like 'E1W %' Then 'Whitechapel'
when Post_Code like 'EC4M %' Then 'London EC4'
when Post_Code like 'AB10 %' Then 'Aberdeen'
when Post_Code like 'AB11 %' Then 'Aberdeen'
when Post_Code like 'AB12 %' Then 'Aberdeen'
when Post_Code like 'AB21 %' Then 'Aberdeen'
when Post_Code like 'AB24 %' Then 'Aberdeen'
when Post_Code like 'B1 %' Then 'Birmingham'
when Post_Code like 'B15 %' Then 'Birmingham'
when Post_Code like 'B16 %' Then 'Birmingham'
when Post_Code like 'B18 %' Then 'Birmingham'
when Post_Code like 'B2 %' Then 'Birmingham'
when Post_Code like 'B3 %' Then 'Birmingham'
when Post_Code like 'B5 %' Then 'Birmingham'
when Post_Code like 'B90 %' Then 'Solihull'
when Post_Code like 'B91 %' Then 'Solihull'
when Post_Code like 'BT1 %' Then 'Belfast'
when Post_Code like 'BT2 %' Then 'Belfast'
when Post_Code like 'BT3 %' Then 'Belfast'
when Post_Code like 'BT7 %' Then 'Belfast'
when Post_Code like 'CA1 %' Then 'Carlisle'
when Post_Code like 'CA11 %' Then 'Penrith'
when Post_Code like 'CA12 %' Then 'Keswick'
when Post_Code like 'CH1 %' Then 'Chester'
when Post_Code like 'CH2 %' Then 'Chester'
when Post_Code like 'CH3 %' Then 'Chester'
when Post_Code like 'CH4 %' Then 'Chester'
when Post_Code like 'CH65 %' Then 'Ellesmere Port'
when Post_Code like 'CV1 %' Then 'Coventry'
when Post_Code like 'CV34 %' Then 'Warwick'
when Post_Code like 'CV37 %' Then 'Stratford Upon Avon'
when Post_Code like 'DD1 %' Then 'Dundee'
when Post_Code like 'DE1 %' Then 'Derby'
when Post_Code like 'DG16 %' Then 'Gretna'
when Post_Code like 'DH1 %' Then 'Durham'
when Post_Code like 'DL1 %' Then 'Darlington'
when Post_Code like 'DY5 %' Then 'Brierley Hill'
when Post_Code like 'EH1 %' Then 'Edinburgh'
when Post_Code like 'EH10 %' Then 'Edinburgh'
when Post_Code like 'EH12 %' Then 'Edinburgh'
when Post_Code like 'EH2 %' Then 'Edinburgh'
when Post_Code like 'EH3 %' Then 'Edinburgh'
when Post_Code like 'EH54 %' Then 'Livingston'
when Post_Code like 'EH6 %' Then 'Edinburgh'
when Post_Code like 'EH8 %' Then 'Edinburgh'
when Post_Code like 'FK17 %' Then 'Callander'
when Post_Code like 'FK8 %' Then 'Stirling'
when Post_Code like 'G1 %' Then 'Glasgow'
when Post_Code like 'G11 %' Then 'Glasgow'
when Post_Code like 'G12 %' Then 'Glasgow'
when Post_Code like 'G2 %' Then 'Glasgow'
when Post_Code like 'G3 %' Then 'Glasgow'
when Post_Code like 'G4 %' Then 'Glasgow'
when Post_Code like 'G41 %' Then 'Glasgow'
when Post_Code like 'HG1 %' Then 'Harrogate'
when Post_Code like 'HU1 %' Then 'Hull'
when Post_Code like 'IV1 %' Then 'Inverness'
when Post_Code like 'IV2 %' Then 'Inverness'
when Post_Code like 'IV3 %' Then 'Inverness'
when Post_Code like 'KA10 %' Then 'Troon'
when Post_Code like 'KA7 %' Then 'Ayr'
when Post_Code like 'KA9 %' Then 'Prestwick'
when Post_Code like 'KY16 %' Then 'St. Andrews'
when Post_Code like 'L1 %' Then 'Liverpool'
when Post_Code like 'L2 %' Then 'Liverpool'
when Post_Code like 'L3 %' Then 'Liverpool'
when Post_Code like 'LA22 %' Then 'Ambleside'
when Post_Code like 'LA23 %' Then 'Windermere'
when Post_Code like 'LA9 %' Then 'Kendal'
when Post_Code like 'LS1 %' Then 'Leeds'
when Post_Code like 'LS10 %' Then 'Leeds'
when Post_Code like 'LS11 %' Then 'Leeds'
when Post_Code like 'LS2 %' Then 'Leeds'
when Post_Code like 'LS29 %' Then 'Ilkley'
when Post_Code like 'LS6 %' Then 'Leeds'
when Post_Code like 'M1 %' Then 'Manchester'
when Post_Code like 'M17 %' Then 'Manchester'
when Post_Code like 'M2 %' Then 'Manchester'
when Post_Code like 'M20 %' Then 'Manchester'
when Post_Code like 'M3 %' Then 'Manchester'
when Post_Code like 'M4 %' Then 'Manchester'
when Post_Code like 'NE1 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE11 %' Then 'Gateshead'
when Post_Code like 'NE2 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NG1 %' Then 'Nottingham'
when Post_Code like 'NG2 %' Then 'Nottingham'
when Post_Code like 'S1 %' Then 'Sheffield'
when Post_Code like 'S9 %' Then 'Sheffield'
when Post_Code like 'SK8 %' Then 'Cheadle'
when Post_Code like 'SK9 %' Then 'Wilmslow'
when Post_Code like 'TS15 %' Then 'Yarm'
when Post_Code like 'WA14 %' Then 'Altrincham'
when Post_Code like 'WA15 %' Then 'Altrincham'
when Post_Code like 'WA16 %' Then 'Knutsford'
when Post_Code like 'WF10 %' Then 'Castleford'
when Post_Code like 'WV1 %' Then 'Wolverhampton'
when Post_Code like 'YO1 %' Then 'York'
when Post_Code like 'YO19 %' Then 'York'
when Post_Code like 'YO31 %' Then 'York'
when Post_Code like 'AL1 %' Then 'St. Albans'
when Post_Code like 'EN8 %' Then 'Waltham Cross'
when Post_Code like 'BA1 %' Then 'Bath'
when Post_Code like 'BA2 %' Then 'Bath'
when Post_Code like 'BH1 %' Then 'Bournemouth'
when Post_Code like 'BH23 %' Then 'Christchurch'
when Post_Code like 'BN1 %' Then 'Brighton'
when Post_Code like 'BN2 %' Then 'Brighton'
when Post_Code like 'BN21 %' Then 'Eastbourne'
when Post_Code like 'BN3 %' Then 'Hove'
when Post_Code like 'BN7 %' Then 'Lewes'
when Post_Code like 'BS1 %' Then 'Bristol'
when Post_Code like 'BS48 %' Then 'Bristol'
when Post_Code like 'BS8 %' Then 'Bristol'
when Post_Code like 'CB1 %' Then 'Cambridge'
when Post_Code like 'CB2 %' Then 'Cambridge'
when Post_Code like 'CB3 %' Then 'Cambridge'
when Post_Code like 'CB4 %' Then 'Cambridge'
when Post_Code like 'CF10 %' Then 'Cardiff'
when Post_Code like 'CM1 %' Then 'Chelmsford'
when Post_Code like 'CR0 %' Then 'Croydon'
when Post_Code like 'CM2 %' Then 'Chelmsford'
when Post_Code like 'CM24 %' Then 'Stansted'
when Post_Code like 'CO1 %' Then 'Colchester'
when Post_Code like 'CT1 %' Then 'Canterbury'
when Post_Code like 'CV32 %' Then 'Leamington Spa'
when Post_Code like 'DA9 %' Then 'Greenhithe'
when Post_Code like 'HA3 %' Then 'Harrow'
when Post_Code like 'HA2 %' Then 'Harrow'
when Post_Code like 'CR4 %' Then 'Mitcham'
when Post_Code like 'HA4 %' Then 'Ruislip'
when Post_Code like 'WD6 %' Then 'Borehamwood'
when Post_Code like 'EN3 %' Then 'Enfield'
when Post_Code like 'KT1 %' Then 'Kingston Upon Thames'
when Post_Code like 'BR1 %' Then 'Bromley'
when Post_Code like 'EX5 %' Then 'Exeter'
when Post_Code like 'GL1 %' Then 'Gloucester'
when Post_Code like 'GL50 %' Then 'Cheltenham'
when Post_Code like 'GL52 %' Then 'Cheltenham'
when Post_Code like 'GL53 %' Then 'Cheltenham'
when Post_Code like 'GL54 %' Then 'Cheltenham'
when Post_Code like 'GU1 %' Then 'Guildford'
when Post_Code like 'GU15 %' Then 'Camberley'
when Post_Code like 'GY1 %' Then 'Guernsey'
when Post_Code like 'GY2 %' Then 'Guernsey'
when Post_Code like 'GY3 %' Then 'Guernsey'
when Post_Code like 'GY4 %' Then 'Guernsey'
when Post_Code like 'GY5 %' Then 'Guernsey'
when Post_Code like 'GY6 %' Then 'Guernsey'
when Post_Code like 'GY7 %' Then 'Guernsey'
when Post_Code like 'GY8 %' Then 'Guernsey'
when Post_Code like 'GY9 %' Then 'Guernsey'
when Post_Code like 'N4 %' Then 'London N4'
when Post_Code like 'HA1 %' Then 'Harrow'
when Post_Code like 'HP5 %' Then 'Chesham'
when Post_Code like 'HP8 %' Then 'Chalfont St. Giles'
when Post_Code like 'HP9 %' Then 'Beaconsfield'
when Post_Code like 'HR1 %' Then 'Hereford'
when Post_Code like 'EN9 %' Then 'Waltham Abbey'
when Post_Code like 'IP1 %' Then 'Ipswich'
when Post_Code like 'IP4 %' Then 'Ipswich'
when Post_Code like 'JE1 %' Then 'Jersey'
when Post_Code like 'JE2 %' Then 'Jersey'
when Post_Code like 'JE3 %' Then 'Jersey'
when Post_Code like 'JE4 %' Then 'Jersey'
when Post_Code like 'TW9 %' Then 'Richmond'
when Post_Code like 'KT22 %' Then 'Leatherhead'
when Post_Code like 'EN2 %' Then 'Enfield'
when Post_Code like 'N14 %' Then 'London N14'
when Post_Code like 'LE1 %' Then 'Leicester'
when Post_Code like 'LE2 %' Then 'Leicester'
when Post_Code like 'LE3 %' Then 'Leicester'
when Post_Code like 'LE4 %' Then 'Leicester'
when Post_Code like 'LU2 %' Then 'Luton'
when Post_Code like 'MK9 %' Then 'Milton Keynes'
when Post_Code like 'KT8 %' Then 'East Molesey'
when Post_Code like 'N22 %' Then 'London N22'
when Post_Code like 'TW13 %' Then 'Feltham'
when Post_Code like 'NR2 %' Then 'Norwich'
when Post_Code like 'NR23 %' Then 'Wells'
when Post_Code like 'NR24 %' Then 'Melton Constable'
when Post_Code like 'NR3 %' Then 'Norwich'
when Post_Code like 'NR6 %' Then 'Norwich'
when Post_Code like 'OX1 %' Then 'Oxford'
when Post_Code like 'OX14 %' Then 'Abingdon'
when Post_Code like 'OX2 %' Then 'Oxford'
when Post_Code like 'OX3 %' Then 'Oxford'
when Post_Code like 'OX4 %' Then 'Oxford'
when Post_Code like 'PE9 %' Then 'Stamford'
when Post_Code like 'PO1 %' Then 'Portsmouth'
when Post_Code like 'PO15 %' Then 'Fareham'
when Post_Code like 'PO19 %' Then 'Chichester'
when Post_Code like 'RG1 %' Then 'Reading'
when Post_Code like 'RG9 %' Then 'Henley on Thames'
when Post_Code like 'RH10 %' Then 'Crawley'
when Post_Code like 'RH12 %' Then 'Horsham'
when Post_Code like 'RH13 %' Then 'Horsham'
when Post_Code like 'RH16 %' Then 'Haywards Heath'
when Post_Code like 'RH4 %' Then 'Dorking'
when Post_Code like 'RH6 %' Then 'Gatwick'
when Post_Code like 'KT4 %' Then 'Worcester Park'
when Post_Code like 'RH8 %' Then 'Oxted'
when Post_Code like 'BR4 %' Then 'West Wickham'
when Post_Code like 'SG12 %' Then 'Ware'
when Post_Code like 'SG5 %' Then 'Hitchin'
when Post_Code like 'SL4 %' Then 'Windsor'
when Post_Code like 'SL5 %' Then 'Ascot'
when Post_Code like 'SL6 %' Then 'Maidenhead'
when Post_Code like 'SL7 %' Then 'Marlow'
when Post_Code like 'TW1 %' Then 'Twickenham'
when Post_Code like 'SN4 %' Then 'Swindon'
when Post_Code like 'SO14 %' Then 'Southampton'
when Post_Code like 'SO15 %' Then 'Southampton'
when Post_Code like 'SO18 %' Then 'Southampton'
when Post_Code like 'SO21 %' Then 'Winchester'
when Post_Code like 'SO23 %' Then 'Winchester'
when Post_Code like 'SO41 %' Then 'Lymington'
when Post_Code like 'KT16 %' Then 'Chertsey'
when Post_Code like 'TW6 %' Then 'Hounslow'
when Post_Code like 'EN1 %' Then 'Enfield'
when Post_Code like 'RH1 %' Then 'Redhill'
when Post_Code like 'KT10 %' Then 'Esher'
when Post_Code like 'CR2 %' Then 'South Croydon'
when Post_Code like 'KT19 %' Then 'Epsom'
when Post_Code like 'EN4 %' Then 'Barnet'
when Post_Code like 'NW4 %' Then 'London NW4'
when Post_Code like 'KT13 %' Then 'Weybridge'
when Post_Code like 'EN5 %' Then 'Barnet'
when Post_Code like 'KT3 %' Then 'New Malden'
when Post_Code like 'AL2 %' Then 'St. Albans'
when Post_Code like 'SL9 %' Then 'Gerrards Cross'
when Post_Code like 'SY8 %' Then 'Ludlow'
when Post_Code like 'TN1 %' Then 'Tunbridge Wells'
when Post_Code like 'BR3 %' Then 'Beckenham'
when Post_Code like 'TW10 %' Then 'Richmond'
when Post_Code like 'EN6 %' Then 'Potters Bar'
when Post_Code like 'TW7 %' Then 'Isleworth'
when Post_Code like 'KT6 %' Then 'Surbiton'
when Post_Code like 'TW20 %' Then 'Egham'
when Post_Code like 'SM1 %' Then 'Sutton'
when Post_Code like 'TW11 %' Then 'Teddington'
when Post_Code like 'KT2 %' Then 'Kingston Upon Thames'
when Post_Code like 'KT11 %' Then 'Cobham'
when Post_Code like 'KT17 %' Then 'Epsom'
when Post_Code like 'KT7 %' Then 'Thames Ditton'
when Post_Code like 'BR7 %' Then 'Chislehurst'
when Post_Code like 'TW12 %' Then 'Hampton'
when Post_Code like 'EN7 %' Then 'Waltham Cross'
when Post_Code like 'TW16 %' Then 'Sunbury on Thames'
when Post_Code like 'KT18 %' Then 'Epsom'
when Post_Code like 'KT5 %' Then 'Surbiton'
when Post_Code like 'WR1 %' Then 'Worcester'
when Post_Code like 'CO2 %' Then 'Colchester'
when Post_Code like 'RM20 %' Then 'Grays'
when Post_Code like 'RH2 %' Then 'Reigate'
when Post_Code like 'AB13 %' Then 'Aberdeenshire'
when Post_Code like 'AB14 %' Then 'Aberdeenshire'
when Post_Code like 'AB15 %' Then 'Aberdeen'
when Post_Code like 'AB16 %' Then 'Aberdeen'
when Post_Code like 'AB22 %' Then 'Aberdeen'
when Post_Code like 'AB23 %' Then 'Aberdeen'
when Post_Code like 'AB25 %' Then 'Aberdeen'
when Post_Code like 'AB30 %' Then 'Laurencekirk'
when Post_Code like 'AB31 %' Then 'Banchory'
when Post_Code like 'AB32 %' Then 'Westhill'
when Post_Code like 'AB33 %' Then 'Alford'
when Post_Code like 'AB34 %' Then 'Aboyne'
when Post_Code like 'AB35 %' Then 'Ballater'
when Post_Code like 'AB36 %' Then 'Strathdon'
when Post_Code like 'AB37 %' Then 'Ballindalloch'
when Post_Code like 'AB38 %' Then 'Aberlour'
when Post_Code like 'AB39 %' Then 'Stonehaven'
when Post_Code like 'AB41 %' Then 'Ellon'
when Post_Code like 'AB42 %' Then 'Peterhead'
when Post_Code like 'AB43 %' Then 'Fraserburgh'
when Post_Code like 'AB44 %' Then 'Macduff'
when Post_Code like 'AB45 %' Then 'Banff'
when Post_Code like 'AB51 %' Then 'Inverurie'
when Post_Code like 'AB52 %' Then 'Insch'
when Post_Code like 'AB53 %' Then 'Turriff'
when Post_Code like 'AB54 %' Then 'Huntly'
when Post_Code like 'AB55 %' Then 'Keith'
when Post_Code like 'AB56 %' Then 'Buckie'
when Post_Code like 'AL10 %' Then 'Hatfield'
when Post_Code like 'AL3 %' Then 'St. Albans'
when Post_Code like 'AL4 %' Then 'St. Albans'
when Post_Code like 'AL5 %' Then 'Harpenden'
when Post_Code like 'AL6 %' Then 'Welwyn'
when Post_Code like 'AL7 %' Then 'Welwyn Garden City'
when Post_Code like 'AL8 %' Then 'Welwyn Garden City'
when Post_Code like 'AL9 %' Then 'Hatfield'
when Post_Code like 'B10 %' Then 'Birmingham'
when Post_Code like 'B11 %' Then 'Birmingham'
when Post_Code like 'B12 %' Then 'Birmingham'
when Post_Code like 'B13 %' Then 'Birmingham'
when Post_Code like 'B14 %' Then 'Birmingham'
when Post_Code like 'B17 %' Then 'Birmingham'
when Post_Code like 'B19 %' Then 'Birmingham'
when Post_Code like 'B20 %' Then 'Birmingham'
when Post_Code like 'B21 %' Then 'Birmingham'
when Post_Code like 'B23 %' Then 'Birmingham'
when Post_Code like 'B24 %' Then 'Birmingham'
when Post_Code like 'B25 %' Then 'Birmingham'
when Post_Code like 'B26 %' Then 'Birmingham'
when Post_Code like 'B27 %' Then 'Birmingham'
when Post_Code like 'B28 %' Then 'Birmingham'
when Post_Code like 'B29 %' Then 'Birmingham'
when Post_Code like 'B30 %' Then 'Birmingham'
when Post_Code like 'B31 %' Then 'Birmingham'
when Post_Code like 'B32 %' Then 'Birmingham'
when Post_Code like 'B33 %' Then 'Birmingham'
when Post_Code like 'B34 %' Then 'Birmingham'
when Post_Code like 'B35 %' Then 'Birmingham'
when Post_Code like 'B36 %' Then 'Birmingham'
when Post_Code like 'B37 %' Then 'Birmingham'
when Post_Code like 'B38 %' Then 'Birmingham'
when Post_Code like 'B4 %' Then 'Birmingham'
when Post_Code like 'B40 %' Then 'Birmingham'
when Post_Code like 'B42 %' Then 'Birmingham'
when Post_Code like 'B43 %' Then 'Birmingham'
when Post_Code like 'B44 %' Then 'Birmingham'
when Post_Code like 'B45 %' Then 'Birmingham'
when Post_Code like 'B46 %' Then 'Birmingham'
when Post_Code like 'B47 %' Then 'Birmingham'
when Post_Code like 'B48 %' Then 'Birmingham'
when Post_Code like 'B49 %' Then 'Alcester'
when Post_Code like 'B50 %' Then 'Alcester'
when Post_Code like 'B6 %' Then 'Birmingham'
when Post_Code like 'B60 %' Then 'Bromsgrove'
when Post_Code like 'B61 %' Then 'Bromsgrove'
when Post_Code like 'B62 %' Then 'Halesowen'
when Post_Code like 'B63 %' Then 'Halesowen'
when Post_Code like 'B64 %' Then 'Warley'
when Post_Code like 'B65 %' Then 'Warley'
when Post_Code like 'B66 %' Then 'Warley'
when Post_Code like 'B67 %' Then 'Warley'
when Post_Code like 'B68 %' Then 'Warley'
when Post_Code like 'B69 %' Then 'Warley'
when Post_Code like 'B7 %' Then 'Birmingham'
when Post_Code like 'B70 %' Then 'West Bromwich'
when Post_Code like 'B71 %' Then 'West Bromwich'
when Post_Code like 'B72 %' Then 'Sutton Coldfield'
when Post_Code like 'B73 %' Then 'Sutton Coldfield'
when Post_Code like 'B74 %' Then 'Sutton Coldfield'
when Post_Code like 'B75 %' Then 'Sutton Coldfield'
when Post_Code like 'B76 %' Then 'Sutton Coldfield'
when Post_Code like 'B77 %' Then 'Tamworth'
when Post_Code like 'B78 %' Then 'Tamworth'
when Post_Code like 'B79 %' Then 'Tamworth'
when Post_Code like 'B8 %' Then 'Birmingham'
when Post_Code like 'B80 %' Then 'Studley'
when Post_Code like 'B9 %' Then 'Birmingham'
when Post_Code like 'B92 %' Then 'Solihull'
when Post_Code like 'B93 %' Then 'Solihull'
when Post_Code like 'B94 %' Then 'Solihull'
when Post_Code like 'B95 %' Then 'Solihull'
when Post_Code like 'B96 %' Then 'Redditch'
when Post_Code like 'B97 %' Then 'Redditch'
when Post_Code like 'B98 %' Then 'Redditch'
when Post_Code like 'BA10 %' Then 'Bruton'
when Post_Code like 'BA11 %' Then 'Frome'
when Post_Code like 'BA12 %' Then 'Warminster'
when Post_Code like 'BA13 %' Then 'Westbury'
when Post_Code like 'BA14 %' Then 'Trowbridge'
when Post_Code like 'BA15 %' Then 'Bradford on Avon'
when Post_Code like 'BA16 %' Then 'Street'
when Post_Code like 'BA20 %' Then 'Yeovil'
when Post_Code like 'BA21 %' Then 'Yeovil'
when Post_Code like 'BA22 %' Then 'Yeovil'
when Post_Code like 'BA3 %' Then 'Bath'
when Post_Code like 'BA4 %' Then 'Shepton Mallet'
when Post_Code like 'BA5 %' Then 'Wells'
when Post_Code like 'BA6 %' Then 'Glastonbury'
when Post_Code like 'BA7 %' Then 'Castle Cary'
when Post_Code like 'BA8 %' Then 'Templecombe'
when Post_Code like 'BA9 %' Then 'Wincanton'
when Post_Code like 'BB1 %' Then 'Blackburn'
when Post_Code like 'BB10 %' Then 'Burnley'
when Post_Code like 'BB11 %' Then 'Burnley'
when Post_Code like 'BB12 %' Then 'Burnley'
when Post_Code like 'BB18 %' Then 'Barnoldswick'
when Post_Code like 'BB2 %' Then 'Blackburn'
when Post_Code like 'BB3 %' Then 'Darwen'
when Post_Code like 'BB4 %' Then 'Rossendale'
when Post_Code like 'BB5 %' Then 'Accrington'
when Post_Code like 'BB6 %' Then 'Blackburn'
when Post_Code like 'BB7 %' Then 'Clitheroe'
when Post_Code like 'BB8 %' Then 'Colne'
when Post_Code like 'BB9 %' Then 'Nelson'
when Post_Code like 'BB94 %' Then 'Blackburn'
when Post_Code like 'BD1 %' Then 'Bradford'
when Post_Code like 'BD10 %' Then 'Bradford'
when Post_Code like 'BD11 %' Then 'Bradford'
when Post_Code like 'BD12 %' Then 'Bradford'
when Post_Code like 'BD13 %' Then 'Bradford'
when Post_Code like 'BD14 %' Then 'Bradford'
when Post_Code like 'BD15 %' Then 'Bradford'
when Post_Code like 'BD16 %' Then 'Bingley'
when Post_Code like 'BD17 %' Then 'Shipley'
when Post_Code like 'BD18 %' Then 'Shipley'
when Post_Code like 'BD19 %' Then 'Cleckheaton'
when Post_Code like 'BD2 %' Then 'Bradford'
when Post_Code like 'BD20 %' Then 'Keighley'
when Post_Code like 'BD21 %' Then 'Keighley'
when Post_Code like 'BD22 %' Then 'Keighley'
when Post_Code like 'BD23 %' Then 'Skipton'
when Post_Code like 'BD24 %' Then 'Settle'
when Post_Code like 'BD3 %' Then 'Bradford'
when Post_Code like 'BD4 %' Then 'Bradford'
when Post_Code like 'BD5 %' Then 'Bradford'
when Post_Code like 'BD6 %' Then 'Bradford'
when Post_Code like 'BD7 %' Then 'Bradford'
when Post_Code like 'BD8 %' Then 'Bradford'
when Post_Code like 'BD9 %' Then 'Bradford'
when Post_Code like 'BD97 %' Then 'Bingley'
when Post_Code like 'BD98 %' Then 'Shipley'
when Post_Code like 'BD99 %' Then 'Bradford'
when Post_Code like 'BH10 %' Then 'Bournemouth'
when Post_Code like 'BH11 %' Then 'Bournemouth'
when Post_Code like 'BH12 %' Then 'Poole'
when Post_Code like 'BH13 %' Then 'Poole'
when Post_Code like 'BH14 %' Then 'Poole'
when Post_Code like 'BH15 %' Then 'Poole'
when Post_Code like 'BH16 %' Then 'Poole'
when Post_Code like 'BH17 %' Then 'Poole'
when Post_Code like 'BH18 %' Then 'Broadstone'
when Post_Code like 'BH19 %' Then 'Swanage'
when Post_Code like 'BH2 %' Then 'Bournemouth'
when Post_Code like 'BH20 %' Then 'Wareham'
when Post_Code like 'BH21 %' Then 'Wimborne'
when Post_Code like 'BH22 %' Then 'Ferndown'
when Post_Code like 'BH24 %' Then 'Ringwood'
when Post_Code like 'BH25 %' Then 'New Milton'
when Post_Code like 'BH3 %' Then 'Bournemouth'
when Post_Code like 'BH31 %' Then 'Verwood'
when Post_Code like 'BH4 %' Then 'Bournemouth'
when Post_Code like 'BH5 %' Then 'Bournemouth'
when Post_Code like 'BH6 %' Then 'Bournemouth'
when Post_Code like 'BH7 %' Then 'Bournemouth'
when Post_Code like 'BH8 %' Then 'Bournemouth'
when Post_Code like 'BH9 %' Then 'Bournemouth'
when Post_Code like 'BL0 %' Then 'Bury'
when Post_Code like 'BL1 %' Then 'Bolton'
when Post_Code like 'BL2 %' Then 'Bolton'
when Post_Code like 'BL3 %' Then 'Bolton'
when Post_Code like 'BL4 %' Then 'Bolton'
when Post_Code like 'BL5 %' Then 'Bolton'
when Post_Code like 'BL6 %' Then 'Bolton'
when Post_Code like 'BL7 %' Then 'Bolton'
when Post_Code like 'BL8 %' Then 'Bury'
when Post_Code like 'BL9 %' Then 'Bury'
when Post_Code like 'BN10 %' Then 'Peacehaven'
when Post_Code like 'BN11 %' Then 'Worthing'
when Post_Code like 'BN12 %' Then 'Worthing'
when Post_Code like 'BN13 %' Then 'Worthing'
when Post_Code like 'BN14 %' Then 'Worthing'
when Post_Code like 'BN15 %' Then 'Lancing'
when Post_Code like 'BN16 %' Then 'Littlehampton'
when Post_Code like 'BN17 %' Then 'Littlehampton'
when Post_Code like 'BN18 %' Then 'Arundel'
when Post_Code like 'BN20 %' Then 'Eastbourne'
when Post_Code like 'BN22 %' Then 'Eastbourne'
when Post_Code like 'BN23 %' Then 'Eastbourne'
when Post_Code like 'BN24 %' Then 'Pevensey'
when Post_Code like 'BN25 %' Then 'Seaford'
when Post_Code like 'BN26 %' Then 'Polegate'
when Post_Code like 'BN27 %' Then 'Hailsham'
when Post_Code like 'BN41 %' Then 'Brighton'
when Post_Code like 'BN42 %' Then 'Brighton'
when Post_Code like 'BN43 %' Then 'Shoreham By Sea'
when Post_Code like 'BN44 %' Then 'Steyning'
when Post_Code like 'BN45 %' Then 'Brighton'
when Post_Code like 'BN5 %' Then 'Henfield'
when Post_Code like 'BN6 %' Then 'Hassocks'
when Post_Code like 'BN8 %' Then 'Lewes'
when Post_Code like 'BN88 %' Then 'Brighton'
when Post_Code like 'BN9 %' Then 'Newhaven'
when Post_Code like 'BN99 %' Then 'Worthing'
when Post_Code like 'SW9 %' Then 'London SW9'
when Post_Code like 'RM13 %' Then 'Rainham'
when Post_Code like 'WD24 %' Then 'North Watford'
when Post_Code like 'BS10 %' Then 'Bristol'
when Post_Code like 'BS11 %' Then 'Bristol'
when Post_Code like 'BS13 %' Then 'Bristol'
when Post_Code like 'BS14 %' Then 'Bristol'
when Post_Code like 'BS15 %' Then 'Bristol'
when Post_Code like 'BS16 %' Then 'Bristol'
when Post_Code like 'BS2 %' Then 'Bristol'
when Post_Code like 'BS20 %' Then 'Bristol'
when Post_Code like 'BS21 %' Then 'Clevedon'
when Post_Code like 'BS22 %' Then 'Weston Super Mare'
when Post_Code like 'BS23 %' Then 'Weston Super Mare'
when Post_Code like 'BS24 %' Then 'Weston Super Mare'
when Post_Code like 'BS25 %' Then 'Winscombe'
when Post_Code like 'BS26 %' Then 'Axbridge'
when Post_Code like 'BS27 %' Then 'Cheddar'
when Post_Code like 'BS28 %' Then 'Wedmore'
when Post_Code like 'BS29 %' Then 'Banwell'
when Post_Code like 'BS3 %' Then 'Bristol'
when Post_Code like 'BS30 %' Then 'Bristol'
when Post_Code like 'BS31 %' Then 'Bristol'
when Post_Code like 'BS32 %' Then 'Bristol'
when Post_Code like 'BS34 %' Then 'Bristol'
when Post_Code like 'BS35 %' Then 'Bristol'
when Post_Code like 'BS36 %' Then 'Bristol'
when Post_Code like 'BS37 %' Then 'Bristol'
when Post_Code like 'BS39 %' Then 'Bristol'
when Post_Code like 'BS4 %' Then 'Bristol'
when Post_Code like 'BS40 %' Then 'Bristol'
when Post_Code like 'BS41 %' Then 'Bristol'
when Post_Code like 'BS49 %' Then 'Bristol'
when Post_Code like 'BS5 %' Then 'Bristol'
when Post_Code like 'BS6 %' Then 'Bristol'
when Post_Code like 'BS7 %' Then 'Bristol'
when Post_Code like 'BS9 %' Then 'Bristol'
when Post_Code like 'BS98 %' Then 'Bristol'
when Post_Code like 'BS99 %' Then 'Bristol'
when Post_Code like 'BT10 %' Then 'Belfast'
when Post_Code like 'BT11 %' Then 'Belfast'
when Post_Code like 'BT12 %' Then 'Belfast'
when Post_Code like 'BT13 %' Then 'Belfast'
when Post_Code like 'BT14 %' Then 'Belfast'
when Post_Code like 'BT15 %' Then 'Belfast'
when Post_Code like 'BT16 %' Then 'Belfast'
when Post_Code like 'BT17 %' Then 'Belfast'
when Post_Code like 'BT18 %' Then 'Holywood'
when Post_Code like 'BT19 %' Then 'Bangor'
when Post_Code like 'BT20 %' Then 'Bangor'
when Post_Code like 'BT21 %' Then 'Donaghadee'
when Post_Code like 'BT22 %' Then 'Newtownards'
when Post_Code like 'BT23 %' Then 'Newtownards'
when Post_Code like 'BT24 %' Then 'Ballynahinch'
when Post_Code like 'BT25 %' Then 'Dromore'
when Post_Code like 'BT26 %' Then 'Hillsborough'
when Post_Code like 'BT27 %' Then 'Lisburn'
when Post_Code like 'BT28 %' Then 'Lisburn'
when Post_Code like 'BT29 %' Then 'County Antrim'
when Post_Code like 'BT30 %' Then 'Downpatrick'
when Post_Code like 'BT31 %' Then 'Castlewellan'
when Post_Code like 'BT32 %' Then 'Banbridge'
when Post_Code like 'BT33 %' Then 'Newcastle'
when Post_Code like 'BT34 %' Then 'Newry'
when Post_Code like 'BT35 %' Then 'Newry'
when Post_Code like 'BT36 %' Then 'Newtownabbey'
when Post_Code like 'BT37 %' Then 'Newtownabbey'
when Post_Code like 'BT38 %' Then 'Carrickfergus'
when Post_Code like 'BT39 %' Then 'Ballyclare'
when Post_Code like 'BT4 %' Then 'Belfast'
when Post_Code like 'BT40 %' Then 'Larne'
when Post_Code like 'BT41 %' Then 'Antrim'
when Post_Code like 'BT42 %' Then 'Ballymena'
when Post_Code like 'BT43 %' Then 'Ballymena'
when Post_Code like 'BT44 %' Then 'Ballymena'
when Post_Code like 'BT45 %' Then 'Magherafelt'
when Post_Code like 'BT46 %' Then 'Maghera'
when Post_Code like 'BT47 %' Then 'Londonderry'
when Post_Code like 'BT48 %' Then 'Londonderry'
when Post_Code like 'BT49 %' Then 'Limavady'
when Post_Code like 'BT5 %' Then 'Belfast'
when Post_Code like 'BT51 %' Then 'Coleraine'
when Post_Code like 'BT52 %' Then 'Coleraine'
when Post_Code like 'BT53 %' Then 'Ballymoney'
when Post_Code like 'BT54 %' Then 'Ballycastle'
when Post_Code like 'BT55 %' Then 'Portstewart'
when Post_Code like 'BT56 %' Then 'Portrush'
when Post_Code like 'BT57 %' Then 'Bushmills'
when Post_Code like 'BT6 %' Then 'Belfast'
when Post_Code like 'BT60 %' Then 'Armagh'
when Post_Code like 'BT61 %' Then 'Armagh'
when Post_Code like 'BT62 %' Then 'Craigavon'
when Post_Code like 'BT63 %' Then 'Craigavon'
when Post_Code like 'BT64 %' Then 'Craigavon'
when Post_Code like 'BT65 %' Then 'Craigavon'
when Post_Code like 'BT66 %' Then 'Craigavon'
when Post_Code like 'BT67 %' Then 'Craigavon'
when Post_Code like 'BT68 %' Then 'Caledon'
when Post_Code like 'BT69 %' Then 'Aughnacloy'
when Post_Code like 'BT70 %' Then 'Dungannon'
when Post_Code like 'BT71 %' Then 'Dungannon'
when Post_Code like 'BT74 %' Then 'Enniskillen'
when Post_Code like 'BT75 %' Then 'Fivemiletown'
when Post_Code like 'BT76 %' Then 'Clogher'
when Post_Code like 'BT77 %' Then 'Augher'
when Post_Code like 'BT78 %' Then 'Omagh'
when Post_Code like 'BT79 %' Then 'Omagh'
when Post_Code like 'BT8 %' Then 'Belfast'
when Post_Code like 'BT80 %' Then 'Cookstown'
when Post_Code like 'BT81 %' Then 'Castlederg'
when Post_Code like 'BT82 %' Then 'Strabane'
when Post_Code like 'BT9 %' Then 'Belfast'
when Post_Code like 'BT92 %' Then 'Enniskillen'
when Post_Code like 'BT93 %' Then 'Enniskillen'
when Post_Code like 'BT94 %' Then 'Enniskillen'
when Post_Code like 'CA10 %' Then 'Penrith'
when Post_Code like 'CA13 %' Then 'Cockermouth'
when Post_Code like 'CA14 %' Then 'Workington'
when Post_Code like 'CA15 %' Then 'Maryport'
when Post_Code like 'CA16 %' Then 'Appleby in Westmorelan'
when Post_Code like 'CA17 %' Then 'Kirkby Stephen'
when Post_Code like 'CA18 %' Then 'Ravenglass'
when Post_Code like 'CA19 %' Then 'Holmrook'
when Post_Code like 'CA2 %' Then 'Carlisle'
when Post_Code like 'CA20 %' Then 'Seascale'
when Post_Code like 'CA21 %' Then 'Beckermet'
when Post_Code like 'CA22 %' Then 'Egremont'
when Post_Code like 'CA23 %' Then 'Cleator'
when Post_Code like 'CA24 %' Then 'Moor Row'
when Post_Code like 'CA25 %' Then 'Cleator Moor'
when Post_Code like 'CA26 %' Then 'Frizington'
when Post_Code like 'CA27 %' Then 'St. Bees'
when Post_Code like 'CA28 %' Then 'Whitehaven'
when Post_Code like 'CA3 %' Then 'Carlisle'
when Post_Code like 'CA4 %' Then 'Carlisle'
when Post_Code like 'CA5 %' Then 'Carlisle'
when Post_Code like 'CA6 %' Then 'Carlisle'
when Post_Code like 'CA7 %' Then 'Wigton'
when Post_Code like 'CA8 %' Then 'Brampton'
when Post_Code like 'CA9 %' Then 'Alston'
when Post_Code like 'CB10 %' Then 'Saffron Walden'
when Post_Code like 'CB11 %' Then 'Saffron Walden'
when Post_Code like 'CB5 %' Then 'Cambridge'
when Post_Code like 'CB6 %' Then 'Ely'
when Post_Code like 'CB7 %' Then 'Ely'
when Post_Code like 'CB8 %' Then 'Newmarket'
when Post_Code like 'CB9 %' Then 'Haverhill'
when Post_Code like 'CF1 %' Then 'Cardiff'
when Post_Code like 'CF11 %' Then 'Cardiff'
when Post_Code like 'CF14 %' Then 'Cardiff'
when Post_Code like 'CF15 %' Then 'Cardiff'
when Post_Code like 'CF2 %' Then 'Cardiff'
when Post_Code like 'CF23 %' Then 'Cardiff'
when Post_Code like 'CF24 %' Then 'Cardiff'
when Post_Code like 'CF3 %' Then 'Cardiff'
when Post_Code like 'CF31 %' Then 'Bridgend'
when Post_Code like 'CF32 %' Then 'Bridgend'
when Post_Code like 'CF33 %' Then 'Bridgend'
when Post_Code like 'CF34 %' Then 'Maesteg'
when Post_Code like 'CF35 %' Then 'Bridgend'
when Post_Code like 'CF36 %' Then 'Porthcawl'
when Post_Code like 'CF37 %' Then 'Pontypridd'
when Post_Code like 'CF38 %' Then 'Pontypridd'
when Post_Code like 'CF39 %' Then 'Porth'
when Post_Code like 'CF4 %' Then 'Cardiff'
when Post_Code like 'CF40 %' Then 'Tonypandy'
when Post_Code like 'CF41 %' Then 'Pentre'
when Post_Code like 'CF42 %' Then 'Treorchy'
when Post_Code like 'CF43 %' Then 'Ferndale'
when Post_Code like 'CF44 %' Then 'Aberdare'
when Post_Code like 'CF45 %' Then 'Mountain Ash'
when Post_Code like 'CF46 %' Then 'Treharris'
when Post_Code like 'CF47 %' Then 'Merthyr Tydfil'
when Post_Code like 'CF48 %' Then 'Merthyr Tydfil'
when Post_Code like 'CF5 %' Then 'Cardiff'
when Post_Code like 'CF6 %' Then 'Cardiff'
when Post_Code like 'CF61 %' Then 'Llantwit Major'
when Post_Code like 'CF62 %' Then 'Barry'
when Post_Code like 'CF63 %' Then 'Barry'
when Post_Code like 'CF64 %' Then 'Penarth'
when Post_Code like 'CF7 %' Then 'Cardiff'
when Post_Code like 'CF71 %' Then 'Cowbridge'
when Post_Code like 'CF72 %' Then 'Pontyclun'
when Post_Code like 'CF8 %' Then 'Cardiff'
when Post_Code like 'CF81 %' Then 'Bargoed'
when Post_Code like 'CF82 %' Then 'Hengoed'
when Post_Code like 'CF83 %' Then 'Caerphilly'
when Post_Code like 'CF99 %' Then 'Cardiff Bay'
when Post_Code like 'CH41 %' Then 'Birkenhead'
when Post_Code like 'CH42 %' Then 'Birkenhead'
when Post_Code like 'CH43 %' Then 'Prenton'
when Post_Code like 'CH44 %' Then 'Wallasey'
when Post_Code like 'CH45 %' Then 'Wallasey'
when Post_Code like 'CH46 %' Then 'Wirral'
when Post_Code like 'CH47 %' Then 'Wirral'
when Post_Code like 'CH48 %' Then 'Wirral'
when Post_Code like 'CH49 %' Then 'Wirral'
when Post_Code like 'CH5 %' Then 'Deeside'
when Post_Code like 'CH6 %' Then 'Flint'
when Post_Code like 'CH60 %' Then 'Wirral'
when Post_Code like 'CH61 %' Then 'Wirral'
when Post_Code like 'CH62 %' Then 'Wirral'
when Post_Code like 'CH63 %' Then 'Wirral'
when Post_Code like 'CH64 %' Then 'Neston'
when Post_Code like 'CH66 %' Then 'Ellesmere Port'
when Post_Code like 'CH7 %' Then 'Mold'
when Post_Code like 'CH8 %' Then 'Holywell'
when Post_Code like 'CH88 %' Then 'Chester'
when Post_Code like 'CH99 %' Then 'Chester'
when Post_Code like 'CM0 %' Then 'Southminster'
when Post_Code like 'CM11 %' Then 'Billericay'
when Post_Code like 'CM12 %' Then 'Billericay'
when Post_Code like 'CM15 %' Then 'Brentwood'
when Post_Code like 'CM17 %' Then 'Harlow'
when Post_Code like 'CM18 %' Then 'Harlow'
when Post_Code like 'CM19 %' Then 'Harlow'
when Post_Code like 'CM20 %' Then 'Harlow'
when Post_Code like 'CM21 %' Then 'Sawbridgeworth'
when Post_Code like 'CM22 %' Then 'Bishops Stortford'
when Post_Code like 'CM23 %' Then 'Bishops Stortford'
when Post_Code like 'CM3 %' Then 'Chelmsford'
when Post_Code like 'CM4 %' Then 'Ingatestone'
when Post_Code like 'CM6 %' Then 'Dunmow'
when Post_Code like 'CM7 %' Then 'Braintree'
when Post_Code like 'CM77 %' Then 'Outskirts of Braintree'
when Post_Code like 'CM8 %' Then 'Witham'
when Post_Code like 'CM9 %' Then 'Maldon'
when Post_Code like 'CO10 %' Then 'Sudbury'
when Post_Code like 'CO11 %' Then 'Manningtree'
when Post_Code like 'CO12 %' Then 'Harwich'
when Post_Code like 'CO13 %' Then 'Frinton on Sea'
when Post_Code like 'CO14 %' Then 'Walt'
when Post_Code like 'CO15 %' Then 'Clacton on Sea'
when Post_Code like 'CO16 %' Then 'Clacton on Sea'
when Post_Code like 'CO2 %' Then 'Colchester'
when Post_Code like 'CO3 %' Then 'Colchester'
when Post_Code like 'CO4 %' Then 'Colchester'
when Post_Code like 'CO5 %' Then 'Colchester'
when Post_Code like 'CO6 %' Then 'Colchester'
when Post_Code like 'CO7 %' Then 'Colchester'
when Post_Code like 'CO8 %' Then 'Bures'
when Post_Code like 'CO9 %' Then 'Halstead'
when Post_Code like 'NW10 %' Then 'London NW10'
when Post_Code like 'HA9 %' Then 'Wembley'
when Post_Code like 'IG1 %' Then 'Ilford'
when Post_Code like 'HA0 %' Then 'Wembley'
when Post_Code like 'SE20 %' Then 'London SE20'
when Post_Code like 'CR9 %' Then 'Croydon'
when Post_Code like 'CT10 %' Then 'Broadstairs'
when Post_Code like 'CT11 %' Then 'Ramsgate'
when Post_Code like 'CT12 %' Then 'Ramsgate'
when Post_Code like 'CT13 %' Then 'Sandwich'
when Post_Code like 'CT14 %' Then 'Deal'
when Post_Code like 'CT15 %' Then 'Dover'
when Post_Code like 'CT16 %' Then 'Dover'
when Post_Code like 'CT17 %' Then 'Dover'
when Post_Code like 'CT18 %' Then 'Folkestone'
when Post_Code like 'CT19 %' Then 'Folkestone'
when Post_Code like 'CT2 %' Then 'Canterbury'
when Post_Code like 'CT20 %' Then 'Folkestone'
when Post_Code like 'CT21 %' Then 'Hythe'
when Post_Code like 'CT3 %' Then 'Canterbury'
when Post_Code like 'CT4 %' Then 'Canterbury'
when Post_Code like 'CT5 %' Then 'Whitstable'
when Post_Code like 'CT6 %' Then 'Herne Bay'
when Post_Code like 'CT7 %' Then 'Birchington'
when Post_Code like 'CT8 %' Then 'Westgate on Sea'
when Post_Code like 'CT9 %' Then 'Margate'
when Post_Code like 'CV10 %' Then 'Nuneaton'
when Post_Code like 'CV11 %' Then 'Nuneaton'
when Post_Code like 'CV12 %' Then 'Nuneaton'
when Post_Code like 'CV13 %' Then 'Nuneaton'
when Post_Code like 'CV2 %' Then 'Coventry'
when Post_Code like 'CV21 %' Then 'Rugby'
when Post_Code like 'CV22 %' Then 'Rugby'
when Post_Code like 'CV23 %' Then 'Rugby'
when Post_Code like 'CV3 %' Then 'Coventry'
when Post_Code like 'CV31 %' Then 'Leamington Spa'
when Post_Code like 'CV33 %' Then 'Leamington Spa'
when Post_Code like 'CV35 %' Then 'Warwick'
when Post_Code like 'CV36 %' Then 'Shipston on Stour'
when Post_Code like 'CV4 %' Then 'Coventry'
when Post_Code like 'CV47 %' Then 'Southam'
when Post_Code like 'CV5 %' Then 'Coventry'
when Post_Code like 'CV6 %' Then 'Coventry'
when Post_Code like 'CV7 %' Then 'Coventry'
when Post_Code like 'CV8 %' Then 'Kenilworth'
when Post_Code like 'CV9 %' Then 'Atherstone'
when Post_Code like 'CW1 %' Then 'Crewe'
when Post_Code like 'CW10 %' Then 'Middlewich'
when Post_Code like 'CW11 %' Then 'Sandbach'
when Post_Code like 'CW12 %' Then 'Congleton'
when Post_Code like 'CW2 %' Then 'Crewe'
when Post_Code like 'CW3 %' Then 'Crewe'
when Post_Code like 'CW4 %' Then 'Crewe'
when Post_Code like 'CW5 %' Then 'Nantwich'
when Post_Code like 'CW6 %' Then 'Tarporley'
when Post_Code like 'CW7 %' Then 'Winsford'
when Post_Code like 'CW8 %' Then 'Northwich'
when Post_Code like 'CW9 %' Then 'Northwich'
when Post_Code like 'W3 %' Then 'London W3'
when Post_Code like 'DA10 %' Then 'Swanscombe'
when Post_Code like 'DA11 %' Then 'Gravesend'
when Post_Code like 'DA12 %' Then 'Gravesend'
when Post_Code like 'DA13 %' Then 'Gravesend'
when Post_Code like 'WD25 %' Then 'Garston'
when Post_Code like 'CR7 %' Then 'Thornton Heath'
when Post_Code like 'E6 %' Then 'London E6'
when Post_Code like 'IG11 %' Then 'Barking'
when Post_Code like 'E7 %' Then 'London E7'
when Post_Code like 'DA3 %' Then 'Longfield'
when Post_Code like 'N17 %' Then 'London N17'
when Post_Code like 'E10 %' Then 'London E10'
when Post_Code like 'DD10 %' Then 'Montrose'
when Post_Code like 'DD11 %' Then 'Arbroath'
when Post_Code like 'DD2 %' Then 'Dundee'
when Post_Code like 'DD3 %' Then 'Dundee'
when Post_Code like 'DD4 %' Then 'Dundee'
when Post_Code like 'DD5 %' Then 'Dundee'
when Post_Code like 'DD6 %' Then 'Newport on Tay'
when Post_Code like 'DD7 %' Then 'Carnoustie'
when Post_Code like 'DD8 %' Then 'Forfar'
when Post_Code like 'DD9 %' Then 'Brechin'
when Post_Code like 'DE11 %' Then 'Swadlincote'
when Post_Code like 'DE12 %' Then 'Swadlincote'
when Post_Code like 'DE13 %' Then 'Burton on Trent'
when Post_Code like 'DE14 %' Then 'Burton on Trent'
when Post_Code like 'DE15 %' Then 'Burton on Trent'
when Post_Code like 'DE21 %' Then 'Derby'
when Post_Code like 'DE22 %' Then 'Derby'
when Post_Code like 'DE23 %' Then 'Derby'
when Post_Code like 'DE24 %' Then 'Derby'
when Post_Code like 'DE3 %' Then 'Derby'
when Post_Code like 'DE4 %' Then 'Matlock'
when Post_Code like 'DE45 %' Then 'Bakewell'
when Post_Code like 'DE5 %' Then 'Ripley'
when Post_Code like 'DE55 %' Then 'Alfreton'
when Post_Code like 'DE56 %' Then 'Belper'
when Post_Code like 'DE6 %' Then 'Ashbourne'
when Post_Code like 'DE65 %' Then 'Derby'
when Post_Code like 'DE7 %' Then 'Ilkeston'
when Post_Code like 'DE72 %' Then 'Derby'
when Post_Code like 'DE73 %' Then 'Derby'
when Post_Code like 'DE74 %' Then 'Derby'
when Post_Code like 'DE75 %' Then 'Heanor'
when Post_Code like 'DE99 %' Then 'Derby'
when Post_Code like 'DG1 %' Then 'Dumfries'
when Post_Code like 'DG10 %' Then 'Moffat'
when Post_Code like 'DG11 %' Then 'Lockerbie'
when Post_Code like 'DG12 %' Then 'Annan'
when Post_Code like 'DG13 %' Then 'Langholm'
when Post_Code like 'DG14 %' Then 'Canonbie'
when Post_Code like 'DG2 %' Then 'Dumfries'
when Post_Code like 'DG3 %' Then 'Thornhill'
when Post_Code like 'DG4 %' Then 'Sanquhar'
when Post_Code like 'DG5 %' Then 'Dalbeattie'
when Post_Code like 'DG6 %' Then 'Kirkcudbright'
when Post_Code like 'DG7 %' Then 'Castle Douglas'
when Post_Code like 'DG8 %' Then 'Newton Stewart'
when Post_Code like 'DG9 %' Then 'Stranraer'
when Post_Code like 'DH2 %' Then 'Chester le Street'
when Post_Code like 'DH3 %' Then 'Chester le Street'
when Post_Code like 'DH4 %' Then 'Houghton le Spring'
when Post_Code like 'DH5 %' Then 'Houghton le Spring'
when Post_Code like 'DH6 %' Then 'Durham'
when Post_Code like 'DH7 %' Then 'Durham'
when Post_Code like 'DH8 %' Then 'Consett'
when Post_Code like 'DH9 %' Then 'Stanley'
when Post_Code like 'DH98 %' Then 'Durham'
when Post_Code like 'DH99 %' Then 'Durham'
when Post_Code like 'DL10 %' Then 'Richmond'
when Post_Code like 'DL11 %' Then 'Richmond'
when Post_Code like 'DL12 %' Then 'Barnard Castle'
when Post_Code like 'DL13 %' Then 'Bishop Auckland'
when Post_Code like 'DL14 %' Then 'Bishop Auckland'
when Post_Code like 'DL15 %' Then 'Crook'
when Post_Code like 'DL16 %' Then 'Spennymoor'
when Post_Code like 'DL17 %' Then 'Ferryhill'
when Post_Code like 'DL2 %' Then 'Darlington'
when Post_Code like 'DL3 %' Then 'Darlington'
when Post_Code like 'DL4 %' Then 'Shildon'
when Post_Code like 'DL5 %' Then 'Newton Aycliffe'
when Post_Code like 'DL6 %' Then 'Northallerton'
when Post_Code like 'DL7 %' Then 'Northallerton'
when Post_Code like 'DL8 %' Then 'Bedale'
when Post_Code like 'DL9 %' Then 'Catterick Garrison'
when Post_Code like 'DN1 %' Then 'Doncaster'
when Post_Code like 'DN10 %' Then 'Doncaster'
when Post_Code like 'DN11 %' Then 'Doncaster'
when Post_Code like 'DN12 %' Then 'Doncaster'
when Post_Code like 'DN14 %' Then 'Goole'
when Post_Code like 'DN15 %' Then 'Scunthorpe'
when Post_Code like 'DN16 %' Then 'Scunthorpe'
when Post_Code like 'DN17 %' Then 'Scunthorpe'
when Post_Code like 'DN18 %' Then 'Barton upon Humber'
when Post_Code like 'DN19 %' Then 'Barrow upon Humber'
when Post_Code like 'DN2 %' Then 'Doncaster'
when Post_Code like 'DN20 %' Then 'Brigg'
when Post_Code like 'DN21 %' Then 'Gainsborough'
when Post_Code like 'DN22 %' Then 'Retford'
when Post_Code like 'DN3 %' Then 'Doncaster'
when Post_Code like 'DN31 %' Then 'Grimsby'
when Post_Code like 'DN32 %' Then 'Grimsby'
when Post_Code like 'DN33 %' Then 'Grimsby'
when Post_Code like 'DN34 %' Then 'Grimsby'
when Post_Code like 'DN35 %' Then 'Cleethorpes'
when Post_Code like 'DN36 %' Then 'Grimsby'
when Post_Code like 'DN37 %' Then 'Grimsby'
when Post_Code like 'DN38 %' Then 'Barnetby'
when Post_Code like 'DN39 %' Then 'Ulceby'
when Post_Code like 'DN4 %' Then 'Doncaster'
when Post_Code like 'DN40 %' Then 'Grimsby'
when Post_Code like 'DN41 %' Then 'Grimsby'
when Post_Code like 'DN5 %' Then 'Doncaster'
when Post_Code like 'DN6 %' Then 'Doncaster'
when Post_Code like 'DN7 %' Then 'Doncaster'
when Post_Code like 'DN8 %' Then 'Doncaster'
when Post_Code like 'DN9 %' Then 'Doncaster'
when Post_Code like 'DT1 %' Then 'Dorchester'
when Post_Code like 'DT10 %' Then 'Sturminster Newton'
when Post_Code like 'DT11 %' Then 'Blandford Forum'
when Post_Code like 'DT2 %' Then 'Dorchester'
when Post_Code like 'DT3 %' Then 'Weymouth'
when Post_Code like 'DT4 %' Then 'Weymouth'
when Post_Code like 'DT5 %' Then 'Portland'
when Post_Code like 'DT6 %' Then 'Bridport'
when Post_Code like 'DT7 %' Then 'Lyme Regis'
when Post_Code like 'DT8 %' Then 'Beaminster'
when Post_Code like 'DT9 %' Then 'Sherborne'
when Post_Code like 'DY1 %' Then 'Dudley'
when Post_Code like 'DY10 %' Then 'Kidderminster'
when Post_Code like 'DY11 %' Then 'Kidderminster'
when Post_Code like 'DY12 %' Then 'Bewdley'
when Post_Code like 'DY13 %' Then 'Stourport on Severn'
when Post_Code like 'DY14 %' Then 'Kidderminster'
when Post_Code like 'DY2 %' Then 'Dudley'
when Post_Code like 'DY3 %' Then 'Dudley'
when Post_Code like 'DY4 %' Then 'Tipton'
when Post_Code like 'DY6 %' Then 'Kingswinford'
when Post_Code like 'DY7 %' Then 'Stourbridge'
when Post_Code like 'DY8 %' Then 'Stourbridge'
when Post_Code like 'DY9 %' Then 'Stourbridge'
when Post_Code like 'E11 %' Then 'London E11'
when Post_Code like 'CR5 %' Then 'Coulsdon'
when Post_Code like 'UB8 %' Then 'Uxbridge'
when Post_Code like 'RM7 %' Then 'Romford'
when Post_Code like 'SE15 %' Then 'London SE15'
when Post_Code like 'SM6 %' Then 'Wallington'
when Post_Code like 'N8 %' Then 'London N8'
when Post_Code like 'SE18 %' Then 'London SE18'
when Post_Code like 'SE16 %' Then 'London SE16'
when Post_Code like 'E13 %' Then 'London E13'
when Post_Code like 'SE13 %' Then 'London SE13'
when Post_Code like 'UB3 %' Then 'Hayes'
when Post_Code like 'TW19 %' Then 'Staines'
when Post_Code like 'SM4 %' Then 'Morden'
when Post_Code like 'BR6 %' Then 'Orpington'
when Post_Code like 'DA1 %' Then 'Dartford'
when Post_Code like 'EH11 %' Then 'Edinburgh'
when Post_Code like 'EH13 %' Then 'Edinburgh'
when Post_Code like 'EH14 %' Then 'Edinburgh'
when Post_Code like 'EH15 %' Then 'Edinburgh'
when Post_Code like 'EH16 %' Then 'Edinburgh'
when Post_Code like 'EH17 %' Then 'Edinburgh'
when Post_Code like 'EH18 %' Then 'Lasswade'
when Post_Code like 'EH19 %' Then 'Bonnyrigg'
when Post_Code like 'EH20 %' Then 'Loanhead'
when Post_Code like 'EH21 %' Then 'Musselburgh'
when Post_Code like 'EH22 %' Then 'Dalkeith'
when Post_Code like 'EH23 %' Then 'Gorebridge'
when Post_Code like 'EH24 %' Then 'Rosewell'
when Post_Code like 'EH25 %' Then 'Roslin'
when Post_Code like 'EH26 %' Then 'Penicuik'
when Post_Code like 'EH27 %' Then 'Kirknewton'
when Post_Code like 'EH28 %' Then 'Newbridge'
when Post_Code like 'EH29 %' Then 'Kirkliston'
when Post_Code like 'EH30 %' Then 'South Queensferry'
when Post_Code like 'EH31 %' Then 'Gullane'
when Post_Code like 'EH32 %' Then 'East Lothian'
when Post_Code like 'EH33 %' Then 'Tranent'
when Post_Code like 'EH34 %' Then 'Tranent'
when Post_Code like 'EH35 %' Then 'Tranent'
when Post_Code like 'EH36 %' Then 'Humbie'
when Post_Code like 'EH37 %' Then 'Pathhead'
when Post_Code like 'EH38 %' Then 'Heriot'
when Post_Code like 'EH39 %' Then 'North Berwick'
when Post_Code like 'EH4 %' Then 'Edinburgh'
when Post_Code like 'EH40 %' Then 'East Linton'
when Post_Code like 'EH41 %' Then 'Haddington'
when Post_Code like 'EH42 %' Then 'Dunbar'
when Post_Code like 'EH43 %' Then 'Walkerburn'
when Post_Code like 'EH44 %' Then 'Innerleithen'
when Post_Code like 'EH45 %' Then 'Peebles'
when Post_Code like 'EH46 %' Then 'West Linton'
when Post_Code like 'EH47 %' Then 'Bathgate'
when Post_Code like 'EH48 %' Then 'Bathgate'
when Post_Code like 'EH49 %' Then 'Linlithgow'
when Post_Code like 'EH5 %' Then 'Edinburgh'
when Post_Code like 'EH51 %' Then 'Bo ness'
when Post_Code like 'EH52 %' Then 'Broxburn'
when Post_Code like 'EH53 %' Then 'Livingston'
when Post_Code like 'EH55 %' Then 'West Calder'
when Post_Code like 'EH7 %' Then 'Edinburgh'
when Post_Code like 'EH9 %' Then 'Edinburgh'
when Post_Code like 'EH99 %' Then 'Edinburgh'
when Post_Code like 'EN10 %' Then 'Broxbourne'
when Post_Code like 'EN11 %' Then 'Hoddesdon'
when Post_Code like 'CR3 %' Then 'Whyteleafe'
when Post_Code like 'UB6 %' Then 'Greenford'
when Post_Code like 'WD17 %' Then 'Watford'
when Post_Code like 'IG6 %' Then 'Ilford'
when Post_Code like 'EX1 %' Then 'Exeter'
when Post_Code like 'EX10 %' Then 'Sidmouth'
when Post_Code like 'EX11 %' Then 'Ottery St. Mary'
when Post_Code like 'EX12 %' Then 'Seaton'
when Post_Code like 'EX13 %' Then 'Axminster'
when Post_Code like 'EX14 %' Then 'Honiton'
when Post_Code like 'EX15 %' Then 'Cullompton'
when Post_Code like 'EX16 %' Then 'Tiverton'
when Post_Code like 'EX17 %' Then 'Crediton'
when Post_Code like 'EX18 %' Then 'Chulmleigh'
when Post_Code like 'EX19 %' Then 'Winkleigh'
when Post_Code like 'EX2 %' Then 'Exeter'
when Post_Code like 'EX20 %' Then 'Okehampton'
when Post_Code like 'EX21 %' Then 'Beaworthy'
when Post_Code like 'EX22 %' Then 'Holsworthy'
when Post_Code like 'EX23 %' Then 'Bude'
when Post_Code like 'EX24 %' Then 'Colyton'
when Post_Code like 'EX3 %' Then 'Exeter'
when Post_Code like 'EX31 %' Then 'Barnstaple'
when Post_Code like 'EX32 %' Then 'Barnstaple'
when Post_Code like 'EX33 %' Then 'Braunton'
when Post_Code like 'EX34 %' Then 'Ilfracombe'
when Post_Code like 'EX35 %' Then 'Devon'
when Post_Code like 'EX36 %' Then 'South Molton'
when Post_Code like 'EX37 %' Then 'Umberleigh'
when Post_Code like 'EX38 %' Then 'Torrington'
when Post_Code like 'EX39 %' Then 'Bideford'
when Post_Code like 'EX4 %' Then 'Exeter'
when Post_Code like 'EX6 %' Then 'Exeter'
when Post_Code like 'EX7 %' Then 'Dawlish'
when Post_Code like 'EX8 %' Then 'Exmouth'
when Post_Code like 'EX9 %' Then 'Budleigh Salterton'
when Post_Code like 'FK1 %' Then 'Falkirk'
when Post_Code like 'FK10 %' Then 'Alloa'
when Post_Code like 'FK11 %' Then 'Menstrie'
when Post_Code like 'FK12 %' Then 'Alva'
when Post_Code like 'FK13 %' Then 'Tillicoultry'
when Post_Code like 'FK14 %' Then 'Dollar'
when Post_Code like 'FK15 %' Then 'Dunblane'
when Post_Code like 'FK16 %' Then 'Doune'
when Post_Code like 'FK18 %' Then 'Callander'
when Post_Code like 'FK19 %' Then 'Lochearnhead'
when Post_Code like 'FK2 %' Then 'Falkirk'
when Post_Code like 'FK20 %' Then 'Crianlarich'
when Post_Code like 'FK21 %' Then 'Killin'
when Post_Code like 'FK3 %' Then 'Grangemouth'
when Post_Code like 'FK4 %' Then 'Bonnybridge'
when Post_Code like 'FK5 %' Then 'Larbert'
when Post_Code like 'FK6 %' Then 'Denny'
when Post_Code like 'FK7 %' Then 'Stirling'
when Post_Code like 'FK9 %' Then 'Stirling'
when Post_Code like 'FY1 %' Then 'Blackpool'
when Post_Code like 'FY2 %' Then 'Blackpool'
when Post_Code like 'FY3 %' Then 'Blackpool'
when Post_Code like 'FY4 %' Then 'Blackpool'
when Post_Code like 'FY5 %' Then 'Thornton Cleveley'
when Post_Code like 'FY6 %' Then 'Poulton le Fylde'
when Post_Code like 'FY7 %' Then 'Fleetwood'
when Post_Code like 'FY8 %' Then 'Lytham St. Annes'
when Post_Code like 'G13 %' Then 'Glasgow'
when Post_Code like 'G14 %' Then 'Glasgow'
when Post_Code like 'G15 %' Then 'Glasgow'
when Post_Code like 'G20 %' Then 'Glasgow'
when Post_Code like 'G21 %' Then 'Glasgow'
when Post_Code like 'G22 %' Then 'Glasgow'
when Post_Code like 'G23 %' Then 'Glasgow'
when Post_Code like 'G31 %' Then 'Glasgow'
when Post_Code like 'G32 %' Then 'Glasgow'
when Post_Code like 'G33 %' Then 'Glasgow'
when Post_Code like 'G34 %' Then 'Glasgow'
when Post_Code like 'G40 %' Then 'Glasgow'
when Post_Code like 'G42 %' Then 'Glasgow'
when Post_Code like 'G43 %' Then 'Glasgow'
when Post_Code like 'G44 %' Then 'Glasgow'
when Post_Code like 'G45 %' Then 'Glasgow'
when Post_Code like 'G46 %' Then 'Glasgow'
when Post_Code like 'G5 %' Then 'Glasgow'
when Post_Code like 'G51 %' Then 'Glasgow'
when Post_Code like 'G52 %' Then 'Glasgow'
when Post_Code like 'G53 %' Then 'Glasgow'
when Post_Code like 'G58 %' Then 'Glasgow'
when Post_Code like 'G60 %' Then 'Glasgow'
when Post_Code like 'G61 %' Then 'Glasgow'
when Post_Code like 'G62 %' Then 'Glasgow'
when Post_Code like 'G63 %' Then 'Glasgow'
when Post_Code like 'G64 %' Then 'Glasgow'
when Post_Code like 'G65 %' Then 'Glasgow'
when Post_Code like 'G66 %' Then 'Glasgow'
when Post_Code like 'G67 %' Then 'Glasgow'
when Post_Code like 'G68 %' Then 'Glasgow'
when Post_Code like 'G69 %' Then 'Glasgow'
when Post_Code like 'G70 %' Then 'Glasgow'
when Post_Code like 'G71 %' Then 'Glasgow'
when Post_Code like 'G72 %' Then 'Glasgow'
when Post_Code like 'G73 %' Then 'Glasgow'
when Post_Code like 'G74 %' Then 'Glasgow'
when Post_Code like 'G75 %' Then 'Glasgow'
when Post_Code like 'G76 %' Then 'Glasgow'
when Post_Code like 'G77 %' Then 'Glasgow'
when Post_Code like 'G78 %' Then 'Glasgow'
when Post_Code like 'G79 %' Then 'Glasgow'
when Post_Code like 'G81 %' Then 'Clydebank'
when Post_Code like 'G82 %' Then 'Dumbarton'
when Post_Code like 'G83 %' Then 'Alexandria'
when Post_Code like 'G84 %' Then 'Helensburgh'
when Post_Code like 'G9 %' Then 'Glasgow'
when Post_Code like 'GL10 %' Then 'Stonehouse'
when Post_Code like 'GL11 %' Then 'Dursley'
when Post_Code like 'GL12 %' Then 'Wotton Under Edge'
when Post_Code like 'GL13 %' Then 'Berkeley'
when Post_Code like 'GL14 %' Then 'Gloucestershire'
when Post_Code like 'GL15 %' Then 'Gloucestershire'
when Post_Code like 'GL16 %' Then 'Coleford'
when Post_Code like 'GL17 %' Then 'Gloucestershire'
when Post_Code like 'GL18 %' Then 'Newent'
when Post_Code like 'GL19 %' Then 'Gloucester'
when Post_Code like 'GL2 %' Then 'Gloucester'
when Post_Code like 'GL20 %' Then 'Tewkesbury'
when Post_Code like 'GL3 %' Then 'Gloucester'
when Post_Code like 'GL4 %' Then 'Gloucester'
when Post_Code like 'GL5 %' Then 'Stroud'
when Post_Code like 'GL51 %' Then 'Cheltenham'
when Post_Code like 'GL55 %' Then 'Chipping Campden'
when Post_Code like 'GL56 %' Then 'Moreton in Marsh'
when Post_Code like 'GL6 %' Then 'Stroud'
when Post_Code like 'GL7 %' Then 'Cirencester'
when Post_Code like 'GL8 %' Then 'Tetbury'
when Post_Code like 'GL9 %' Then 'Badminton'
when Post_Code like 'GU10 %' Then 'Farnham'
when Post_Code like 'GU11 %' Then 'Aldershot'
when Post_Code like 'GU12 %' Then 'Aldershot'
when Post_Code like 'GU14 %' Then 'Farnborough'
when Post_Code like 'GU16 %' Then 'Camberley'
when Post_Code like 'GU17 %' Then 'Camberley'
when Post_Code like 'GU18 %' Then 'Lightwater'
when Post_Code like 'GU19 %' Then 'Bagshot'
when Post_Code like 'GU2 %' Then 'Guildford'
when Post_Code like 'GU20 %' Then 'Windlesham'
when Post_Code like 'GU21 %' Then 'Woking'
when Post_Code like 'GU22 %' Then 'Woking'
when Post_Code like 'RM3 %' Then 'Romford'
when Post_Code like 'GU24 %' Then 'Woking'
when Post_Code like 'GU25 %' Then 'Virginia Water'
when Post_Code like 'GU26 %' Then 'Hindhead'
when Post_Code like 'GU27 %' Then 'Haslemere'
when Post_Code like 'GU28 %' Then 'Petworth'
when Post_Code like 'GU29 %' Then 'Midhurst'
when Post_Code like 'GU3 %' Then 'Guildford'
when Post_Code like 'GU30 %' Then 'Liphook'
when Post_Code like 'GU31 %' Then 'Petersfield'
when Post_Code like 'GU32 %' Then 'Petersfield'
when Post_Code like 'GU33 %' Then 'Liss'
when Post_Code like 'GU34 %' Then 'Alton'
when Post_Code like 'GU35 %' Then 'Bordon'
when Post_Code like 'GU4 %' Then 'Guildford'
when Post_Code like 'GU46 %' Then 'Yateley'
when Post_Code like 'GU47 %' Then 'Sandhurst'
when Post_Code like 'GU5 %' Then 'Guildford'
when Post_Code like 'GU51 %' Then 'Fleet'
when Post_Code like 'GU52 %' Then 'Church Crookham'
when Post_Code like 'GU6 %' Then 'Cranleigh'
when Post_Code like 'GU7 %' Then 'Godalming'
when Post_Code like 'GU8 %' Then 'Godalming'
when Post_Code like 'GU9 %' Then 'Farnham'
when Post_Code like 'NW5 %' Then 'London NW5'
when Post_Code like 'BR5 %' Then 'Orpington'
when Post_Code like 'N19 %' Then 'London N19'
when Post_Code like 'WD3 %' Then 'Rickmansworth'
when Post_Code like 'HA7 %' Then 'Stanmore'
when Post_Code like 'DA8 %' Then 'Erith'
when Post_Code like 'HD1 %' Then 'Huddersfield'
when Post_Code like 'HD2 %' Then 'Huddersfield'
when Post_Code like 'HD3 %' Then 'Huddersfield'
when Post_Code like 'HD4 %' Then 'Huddersfield'
when Post_Code like 'HD5 %' Then 'Huddersfield'
when Post_Code like 'HD6 %' Then 'Brighouse'
when Post_Code like 'HD7 %' Then 'Huddersfield'
when Post_Code like 'HD8 %' Then 'Huddersfield'
when Post_Code like 'HD9 %' Then 'Huddersfield'
when Post_Code like 'HG2 %' Then 'Harrogate'
when Post_Code like 'HG3 %' Then 'Harrogate'
when Post_Code like 'HG4 %' Then 'Ripon'
when Post_Code like 'HG5 %' Then 'Knaresborough'
when Post_Code like 'HP1 %' Then 'Hemel Hempstead'
when Post_Code like 'HP10 %' Then 'High Wycombe'
when Post_Code like 'HP11 %' Then 'High Wycombe'
when Post_Code like 'HP12 %' Then 'High Wycombe'
when Post_Code like 'HP13 %' Then 'High Wycombe'
when Post_Code like 'HP14 %' Then 'High Wycombe'
when Post_Code like 'HP15 %' Then 'High Wycombe'
when Post_Code like 'HP16 %' Then 'Great Missenden'
when Post_Code like 'HP17 %' Then 'Aylesbury'
when Post_Code like 'HP18 %' Then 'Aylesbury'
when Post_Code like 'HP19 %' Then 'Aylesbury'
when Post_Code like 'HP2 %' Then 'Hemel Hempstead'
when Post_Code like 'HP20 %' Then 'Aylesbury'
when Post_Code like 'HP21 %' Then 'Aylesbury'
when Post_Code like 'HP22 %' Then 'Aylesbury'
when Post_Code like 'HP23 %' Then 'Tring'
when Post_Code like 'HP27 %' Then 'Princes Risborough'
when Post_Code like 'HP3 %' Then 'Hemel Hempstead'
when Post_Code like 'HP4 %' Then 'Berkhamsted'
when Post_Code like 'HP6 %' Then 'Amersham'
when Post_Code like 'HP7 %' Then 'Amersham'
when Post_Code like 'HR2 %' Then 'Hereford'
when Post_Code like 'HR3 %' Then 'Hereford'
when Post_Code like 'HR4 %' Then 'Hereford'
when Post_Code like 'HR5 %' Then 'Kington'
when Post_Code like 'HR6 %' Then 'Leominster'
when Post_Code like 'HR7 %' Then 'Bromyard'
when Post_Code like 'HR8 %' Then 'Ledbury'
when Post_Code like 'HR9 %' Then 'Ross on Wye'
when Post_Code like 'HS1 %' Then 'Stornoway'
when Post_Code like 'HS2 %' Then 'Isle of Lewis'
when Post_Code like 'HS3 %' Then 'Harris'
when Post_Code like 'HS4 %' Then 'Isle of Scalpay'
when Post_Code like 'HS5 %' Then 'Leverburgh'
when Post_Code like 'HS6 %' Then 'Lochmaddy'
when Post_Code like 'HS7 %' Then 'Isle of Benbecula'
when Post_Code like 'HS8 %' Then 'Lochboisdale'
when Post_Code like 'HS9 %' Then 'Castlebay'
when Post_Code like 'HU10 %' Then 'Hull'
when Post_Code like 'HU11 %' Then 'Hull'
when Post_Code like 'HU12 %' Then 'Hull'
when Post_Code like 'HU13 %' Then 'Hessle'
when Post_Code like 'HU14 %' Then 'North Ferriby'
when Post_Code like 'HU15 %' Then 'Brough'
when Post_Code like 'HU16 %' Then 'Cottingham'
when Post_Code like 'HU17 %' Then 'Beverley'
when Post_Code like 'HU18 %' Then 'Hornsea'
when Post_Code like 'HU19 %' Then 'Withernsea'
when Post_Code like 'HU2 %' Then 'Hull'
when Post_Code like 'HU20 %' Then 'Cottingham'
when Post_Code like 'HU3 %' Then 'Hull'
when Post_Code like 'HU4 %' Then 'Hull'
when Post_Code like 'HU5 %' Then 'Hull'
when Post_Code like 'HU6 %' Then 'Hull'
when Post_Code like 'HU7 %' Then 'Hull'
when Post_Code like 'HU8 %' Then 'Hull'
when Post_Code like 'HU9 %' Then 'Hull'
when Post_Code like 'HX1 %' Then 'Halifax'
when Post_Code like 'HX2 %' Then 'Halifax'
when Post_Code like 'HX3 %' Then 'Halifax'
when Post_Code like 'HX4 %' Then 'Halifax'
when Post_Code like 'HX5 %' Then 'Elland'
when Post_Code like 'HX6 %' Then 'Sowerby Bridge'
when Post_Code like 'HX7 %' Then 'Hebden Bridge'
when Post_Code like 'IC %' Then 'Channel Islands'
when Post_Code like 'RM1 %' Then 'Romford'
when Post_Code like 'SE17 %' Then 'London SE17'
when Post_Code like 'SE9 %' Then 'London SE9'
when Post_Code like 'KT9 %' Then 'Chessington'
when Post_Code like 'SE25 %' Then 'London SE25'
when Post_Code like 'N18 %' Then 'London N18'
when Post_Code like 'RM14 %' Then 'Upminster'
when Post_Code like 'N9 %' Then 'London N9'
when Post_Code like 'N15 %' Then 'London N15'
when Post_Code like 'N13 %' Then 'London N13'
when Post_Code like 'IM1 %' Then 'Douglas'
when Post_Code like 'IM2 %' Then 'Douglas'
when Post_Code like 'IM3 %' Then 'Douglas'
when Post_Code like 'IM4 %' Then 'Douglas'
when Post_Code like 'IM5 %' Then 'Peel'
when Post_Code like 'IM6 %' Then 'Kirk Michael'
when Post_Code like 'IM7 %' Then 'Ramsey'
when Post_Code like 'IM8 %' Then 'Ramsey'
when Post_Code like 'IM9 %' Then 'Castletown'
when Post_Code like 'IM99 %' Then 'Douglas'
when Post_Code like 'IP10 %' Then 'Ipswich'
when Post_Code like 'IP11 %' Then 'Felixstowe'
when Post_Code like 'IP12 %' Then 'Woodbridge'
when Post_Code like 'IP13 %' Then 'Woodbridge'
when Post_Code like 'IP14 %' Then 'Stowmarket'
when Post_Code like 'IP15 %' Then 'Aldeburgh'
when Post_Code like 'IP16 %' Then 'Leiston'
when Post_Code like 'IP17 %' Then 'Saxmundham'
when Post_Code like 'IP18 %' Then 'Southwold'
when Post_Code like 'IP19 %' Then 'Halesworth'
when Post_Code like 'IP2 %' Then 'Ipswich'
when Post_Code like 'IP20 %' Then 'Harleston'
when Post_Code like 'IP21 %' Then 'Hoxne'
when Post_Code like 'IP22 %' Then 'Diss'
when Post_Code like 'IP23 %' Then 'Eye'
when Post_Code like 'IP24 %' Then 'Thetford'
when Post_Code like 'IP25 %' Then 'Thetford'
when Post_Code like 'IP26 %' Then 'Thetford'
when Post_Code like 'IP27 %' Then 'Brandon'
when Post_Code like 'IP28 %' Then 'Bury St. Edmunds'
when Post_Code like 'IP29 %' Then 'Bury St. Edmunds'
when Post_Code like 'IP3 %' Then 'Ipswich'
when Post_Code like 'IP30 %' Then 'Bury St. Edmunds'
when Post_Code like 'IP31 %' Then 'Bury St. Edmunds'
when Post_Code like 'IP32 %' Then 'Bury St. Edmunds'
when Post_Code like 'IP33 %' Then 'Bury St. Edmunds'
when Post_Code like 'IP5 %' Then 'Ipswich'
when Post_Code like 'IP6 %' Then 'Ipswich'
when Post_Code like 'IP7 %' Then 'Ipswich'
when Post_Code like 'IP8 %' Then 'Ipswich'
when Post_Code like 'IP9 %' Then 'Ipswich'
when Post_Code like 'IV10 %' Then 'Fortrose'
when Post_Code like 'IV11 %' Then 'Cromarty'
when Post_Code like 'IV12 %' Then 'Nairn'
when Post_Code like 'IV13 %' Then 'Inverness'
when Post_Code like 'IV14 %' Then 'Strathpeffer'
when Post_Code like 'IV15 %' Then 'Dingwall'
when Post_Code like 'IV16 %' Then 'Dingwall'
when Post_Code like 'IV17 %' Then 'Alness'
when Post_Code like 'IV18 %' Then 'Invergordon'
when Post_Code like 'IV19 %' Then 'Tain'
when Post_Code like 'IV20 %' Then 'Tain'
when Post_Code like 'IV21 %' Then 'Gairloch'
when Post_Code like 'IV22 %' Then 'Achnasheen'
when Post_Code like 'IV23 %' Then 'Garve'
when Post_Code like 'IV24 %' Then 'Ardgay'
when Post_Code like 'IV25 %' Then 'Dornoch'
when Post_Code like 'IV26 %' Then 'Ullapool'
when Post_Code like 'IV27 %' Then 'Lairg'
when Post_Code like 'IV28 %' Then 'Rogart'
when Post_Code like 'IV30 %' Then 'Elgin'
when Post_Code like 'IV31 %' Then 'Lossiemouth'
when Post_Code like 'IV32 %' Then 'Fochabers'
when Post_Code like 'IV36 %' Then 'Forres'
when Post_Code like 'IV4 %' Then 'Beauly'
when Post_Code like 'IV40 %' Then 'Kyle'
when Post_Code like 'IV41 %' Then 'Isle of Skye'
when Post_Code like 'IV42 %' Then 'Isle of Skye'
when Post_Code like 'IV43 %' Then 'Isle of Skye'
when Post_Code like 'IV44 %' Then 'Isle of Skye'
when Post_Code like 'IV45 %' Then 'Isle of Skye'
when Post_Code like 'IV46 %' Then 'Inverness'
when Post_Code like 'IV47 %' Then 'Isle of Skye'
when Post_Code like 'IV48 %' Then 'Isle of Skye'
when Post_Code like 'IV49 %' Then 'Isle of Skye'
when Post_Code like 'IV5 %' Then 'Inverness'
when Post_Code like 'IV51 %' Then 'Portree'
when Post_Code like 'IV52 %' Then 'Plockton'
when Post_Code like 'IV53 %' Then 'Strome Ferry'
when Post_Code like 'IV54 %' Then 'Strathcarron'
when Post_Code like 'IV55 %' Then 'Isle of Skye'
when Post_Code like 'IV56 %' Then 'Isle of Skye'
when Post_Code like 'IV6 %' Then 'Muir of Ord'
when Post_Code like 'IV63 %' Then 'Inverness'
when Post_Code like 'IV7 %' Then 'Dingwall'
when Post_Code like 'IV8 %' Then 'Munlochy'
when Post_Code like 'IV9 %' Then 'Avoch'
when Post_Code like 'KA1 %' Then 'Kilmarnock'
when Post_Code like 'KA11 %' Then 'Irvine'
when Post_Code like 'KA12 %' Then 'Irvine'
when Post_Code like 'KA13 %' Then 'Kilwinning'
when Post_Code like 'KA14 %' Then 'Beith'


ELSE Post_Code END AS Segmentation
into #final
from #accountbuild


union

select Fdmsaccountno,
Seller_Code,
mcc_code,
chain_chain_no,
Dba_name,
se_number,
pca,
post_code,
rolling12,
Case

when Post_Code like 'KA15 %' Then 'Beith'
when Post_Code like 'KA16 %' Then 'Newmilns'
when Post_Code like 'KA17 %' Then 'Darvel'
when Post_Code like 'KA18 %' Then 'Cumnock'
when Post_Code like 'KA19 %' Then 'Maybole'
when Post_Code like 'KA2 %' Then 'Kilmarnock'
when Post_Code like 'KA20 %' Then 'Stevenston'
when Post_Code like 'KA21 %' Then 'Saltcoats'
when Post_Code like 'KA22 %' Then 'Ardrossan'
when Post_Code like 'KA23 %' Then 'West Kilbride'
when Post_Code like 'KA24 %' Then 'Dalry'
when Post_Code like 'KA25 %' Then 'Kilbirnie'
when Post_Code like 'KA26 %' Then 'Girvan'
when Post_Code like 'KA27 %' Then 'Brodick'
when Post_Code like 'KA28 %' Then 'Millport'
when Post_Code like 'KA29 %' Then 'Largs'
when Post_Code like 'KA3 %' Then 'Kilmarnock'
when Post_Code like 'KA30 %' Then 'Largs'
when Post_Code like 'KA4 %' Then 'Galston'
when Post_Code like 'KA5 %' Then 'Mauchline'
when Post_Code like 'KA6 %' Then 'Ayr'
when Post_Code like 'KA8 %' Then 'Ayr'
when Post_Code like 'UB4 %' Then 'Hayes'
when Post_Code like 'SW17 %' Then 'London SW17'
when Post_Code like 'RM8 %' Then 'Dagenham'
when Post_Code like 'SE6 %' Then 'London SE6'
when Post_Code like 'TW8 %' Then 'Brentford'
when Post_Code like 'UB5 %' Then 'Northolt'
when Post_Code like 'DA2 %' Then 'Dartford'
when Post_Code like 'IG8 %' Then 'Woodford Green'
when Post_Code like 'BR2 %' Then 'Bromley'
when Post_Code like 'RM12 %' Then 'Hornchurch'
when Post_Code like 'RH2 %' Then 'Reigate'
when Post_Code like 'SE5 %' Then 'London SE5'
when Post_Code like 'DA14 %' Then 'Sidcup'
when Post_Code like 'WD5 %' Then 'Abbots Langley'
when Post_Code like 'E12 %' Then 'London E12'
when Post_Code like 'KW1 %' Then 'Wick'
when Post_Code like 'KW10 %' Then 'Golspie'
when Post_Code like 'KW11 %' Then 'Kinbrace'
when Post_Code like 'KW12 %' Then 'Halkirk'
when Post_Code like 'KW13 %' Then 'Forsinard'
when Post_Code like 'KW14 %' Then 'Thurso'
when Post_Code like 'KW15 %' Then 'Kirkwall'
when Post_Code like 'KW16 %' Then 'Stromness'
when Post_Code like 'KW17 %' Then 'Orkney'
when Post_Code like 'KW2 %' Then 'Kirkwall'
when Post_Code like 'KW3 %' Then 'Lybster'
when Post_Code like 'KW5 %' Then 'Latheron'
when Post_Code like 'KW6 %' Then 'Dunbeath'
when Post_Code like 'KW7 %' Then 'Berriedale'
when Post_Code like 'KW8 %' Then 'Helmsdale'
when Post_Code like 'KW9 %' Then 'Brora'
when Post_Code like 'KY1 %' Then 'Kirkcaldy'
when Post_Code like 'KY10 %' Then 'Anstruther'
when Post_Code like 'KY11 %' Then 'Inverkeithing'
when Post_Code like 'KY12 %' Then 'Dunfermline'
when Post_Code like 'KY13 %' Then 'Kinross'
when Post_Code like 'KY14 %' Then 'Cupar'
when Post_Code like 'KY15 %' Then 'Cupar'
when Post_Code like 'KY2 %' Then 'Kirkcaldy'
when Post_Code like 'KY3 %' Then 'Burntisland'
when Post_Code like 'KY4 %' Then 'Kelty'
when Post_Code like 'KY5 %' Then 'Lochgelly'
when Post_Code like 'KY6 %' Then 'Glenrothes'
when Post_Code like 'KY7 %' Then 'Glenrothes'
when Post_Code like 'KY8 %' Then 'Leven'
when Post_Code like 'KY9 %' Then 'Leven'
when Post_Code like 'KY99 %' Then 'Dunfermline'
when Post_Code like 'L10 %' Then 'Liverpool'
when Post_Code like 'L11 %' Then 'Liverpool'
when Post_Code like 'L12 %' Then 'Liverpool'
when Post_Code like 'L13 %' Then 'Liverpool'
when Post_Code like 'L14 %' Then 'Liverpool'
when Post_Code like 'L15 %' Then 'Liverpool'
when Post_Code like 'L16 %' Then 'Liverpool'
when Post_Code like 'L17 %' Then 'Liverpool'
when Post_Code like 'L18 %' Then 'Liverpool'
when Post_Code like 'L19 %' Then 'Liverpool'
when Post_Code like 'L20 %' Then 'Bootle'
when Post_Code like 'L21 %' Then 'Liverpool'
when Post_Code like 'L22 %' Then 'Liverpool'
when Post_Code like 'L23 %' Then 'Liverpool'
when Post_Code like 'L24 %' Then 'Liverpool'
when Post_Code like 'L25 %' Then 'Liverpool'
when Post_Code like 'L26 %' Then 'Liverpool'
when Post_Code like 'L27 %' Then 'Liverpool'
when Post_Code like 'L28 %' Then 'Liverpool'
when Post_Code like 'L29 %' Then 'Liverpool'
when Post_Code like 'L30 %' Then 'Bootle'
when Post_Code like 'L31 %' Then 'Liverpool'
when Post_Code like 'L32 %' Then 'Liverpool'
when Post_Code like 'L33 %' Then 'Liverpool'
when Post_Code like 'L34 %' Then 'Prescot'
when Post_Code like 'L35 %' Then 'Prescot'
when Post_Code like 'L36 %' Then 'Liverpool'
when Post_Code like 'L37 %' Then 'Liverpool'
when Post_Code like 'L38 %' Then 'Liverpool'
when Post_Code like 'L39 %' Then 'Ormskirk'
when Post_Code like 'L4 %' Then 'Liverpool'
when Post_Code like 'L40 %' Then 'Ormskirk'
when Post_Code like 'L5 %' Then 'Liverpool'
when Post_Code like 'L6 %' Then 'Liverpool'
when Post_Code like 'L67 %' Then 'Liverpool'
when Post_Code like 'L68 %' Then 'Liverpool'
when Post_Code like 'L69 %' Then 'Liverpool'
when Post_Code like 'L7 %' Then 'Liverpool'
when Post_Code like 'L70 %' Then 'Merseyside'
when Post_Code like 'L72 %' Then 'Liverpool'
when Post_Code like 'L74 %' Then 'Liverpool'
when Post_Code like 'L8 %' Then 'Liverpool'
when Post_Code like 'L9 %' Then 'Liverpool'
when Post_Code like 'LA1 %' Then 'Lancaster'
when Post_Code like 'LA10 %' Then 'Sedbergh'
when Post_Code like 'LA11 %' Then 'Grange Over Sands'
when Post_Code like 'LA12 %' Then 'Ulverston'
when Post_Code like 'LA13 %' Then 'Barrow in Furness'
when Post_Code like 'LA14 %' Then 'Barrow in Furness'
when Post_Code like 'LA15 %' Then 'Dalton in Furness'
when Post_Code like 'LA16 %' Then 'Askam in Furness'
when Post_Code like 'LA17 %' Then 'Kirkby in Furness'
when Post_Code like 'LA18 %' Then 'Millom'
when Post_Code like 'LA19 %' Then 'Millom'
when Post_Code like 'LA2 %' Then 'Lancaster'
when Post_Code like 'LA20 %' Then 'Broughton in Furness'
when Post_Code like 'LA21 %' Then 'Coniston'
when Post_Code like 'LA3 %' Then 'Morecambe'
when Post_Code like 'LA4 %' Then 'Morecambe'
when Post_Code like 'LA5 %' Then 'Carnforth'
when Post_Code like 'LA6 %' Then 'Carnforth'
when Post_Code like 'LA7 %' Then 'Milnthorpe'
when Post_Code like 'LA8 %' Then 'Kendal'
when Post_Code like 'LD1 %' Then 'Llandrindod Wells'
when Post_Code like 'LD2 %' Then 'Builth Wells'
when Post_Code like 'LD3 %' Then 'Brecon'
when Post_Code like 'LD4 %' Then 'Llangammarch Wells'
when Post_Code like 'LD5 %' Then 'Llanwrtyd Wells'
when Post_Code like 'LD6 %' Then 'Rhayader'
when Post_Code like 'LD7 %' Then 'Knighton'
when Post_Code like 'LD8 %' Then 'Presteigne'
when Post_Code like 'LE10 %' Then 'Hinckley'
when Post_Code like 'LE11 %' Then 'Loughborough'
when Post_Code like 'LE12 %' Then 'Loughborough'
when Post_Code like 'LE13 %' Then 'Melton Mowbray'
when Post_Code like 'LE14 %' Then 'Melton Mowbray'
when Post_Code like 'LE15 %' Then 'Oakham'
when Post_Code like 'LE16 %' Then 'Market Harborough'
when Post_Code like 'LE17 %' Then 'Lutterworth'
when Post_Code like 'LE18 %' Then 'Wigston'
when Post_Code like 'LE19 %' Then 'East Midlands Airport'
when Post_Code like 'LE5 %' Then 'Leicester'
when Post_Code like 'LE6 %' Then 'Leicester'
when Post_Code like 'LE65 %' Then 'Ashby de la Zouch'
when Post_Code like 'LE67 %' Then 'Coalville'
when Post_Code like 'LE7 %' Then 'Leicester'
when Post_Code like 'LE8 %' Then 'Leicester'
when Post_Code like 'LE9 %' Then 'Leicester'
when Post_Code like 'LL11 %' Then 'Wrexham'
when Post_Code like 'LL12 %' Then 'Wrexham'
when Post_Code like 'LL13 %' Then 'Wrexham'
when Post_Code like 'LL14 %' Then 'Wrexham'
when Post_Code like 'LL15 %' Then 'Ruthin'
when Post_Code like 'LL16 %' Then 'Denbigh'
when Post_Code like 'LL17 %' Then 'St. Asaph'
when Post_Code like 'LL18 %' Then 'Rhyl'
when Post_Code like 'LL19 %' Then 'Prestatyn'
when Post_Code like 'LL20 %' Then 'Llangollen'
when Post_Code like 'LL21 %' Then 'Corwen'
when Post_Code like 'LL22 %' Then 'Abergele'
when Post_Code like 'LL23 %' Then 'Bala'
when Post_Code like 'LL24 %' Then 'Betws y Coed'
when Post_Code like 'LL25 %' Then 'Dolwyddelan'
when Post_Code like 'LL26 %' Then 'Llanrwst'
when Post_Code like 'LL27 %' Then 'Trefriw'
when Post_Code like 'LL28 %' Then 'Colwyn Bay'
when Post_Code like 'LL29 %' Then 'Colwyn Bay'
when Post_Code like 'LL30 %' Then 'Llandudno'
when Post_Code like 'LL31 %' Then 'Gwynedd'
when Post_Code like 'LL32 %' Then 'Conwy'
when Post_Code like 'LL33 %' Then 'Llanfairfechan'
when Post_Code like 'LL34 %' Then 'Penmaenmawr'
when Post_Code like 'LL35 %' Then 'Aberdovey'
when Post_Code like 'LL36 %' Then 'Tywyn'
when Post_Code like 'LL37 %' Then 'Llwyngwril'
when Post_Code like 'LL38 %' Then 'Fairbourne'
when Post_Code like 'LL39 %' Then 'Arthog'
when Post_Code like 'LL40 %' Then 'Dolgellau'
when Post_Code like 'LL41 %' Then 'Blaenau Ffestiniog'
when Post_Code like 'LL42 %' Then 'Barmouth'
when Post_Code like 'LL43 %' Then 'Talybont'
when Post_Code like 'LL44 %' Then 'Dyffryn Ardudwy'
when Post_Code like 'LL45 %' Then 'Llanbedr'
when Post_Code like 'LL46 %' Then 'Harlech'
when Post_Code like 'LL47 %' Then 'Talsarnau'
when Post_Code like 'LL48 %' Then 'Penrhyndeudraeth'
when Post_Code like 'LL49 %' Then 'Porthmadog'
when Post_Code like 'LL51 %' Then 'Garndolbenmaen'
when Post_Code like 'LL52 %' Then 'Criccieth'
when Post_Code like 'LL53 %' Then 'Pwllheli'
when Post_Code like 'LL54 %' Then 'Caernarfon'
when Post_Code like 'LL55 %' Then 'Caernarfon'
when Post_Code like 'LL56 %' Then 'Port Dinorwic'
when Post_Code like 'LL57 %' Then 'Bangor'
when Post_Code like 'LL58 %' Then 'Beaumaris'
when Post_Code like 'LL59 %' Then 'Menai Bridge'
when Post_Code like 'LL60 %' Then 'Gaerwen'
when Post_Code like 'LL61 %' Then 'Llanfairpwllgwyngyll'
when Post_Code like 'LL62 %' Then 'Bodorgan'
when Post_Code like 'LL63 %' Then 'Ty Croes'
when Post_Code like 'LL64 %' Then 'Rhosneigr'
when Post_Code like 'LL65 %' Then 'Holyhead'
when Post_Code like 'LL66 %' Then 'Rhosgoch'
when Post_Code like 'LL67 %' Then 'Cemaes Bay'
when Post_Code like 'LL68 %' Then 'Amlwch'
when Post_Code like 'LL69 %' Then 'Penysarn'
when Post_Code like 'LL70 %' Then 'Dulas'
when Post_Code like 'LL71 %' Then 'Llanerchymedd'
when Post_Code like 'LL72 %' Then 'Moelfre'
when Post_Code like 'LL73 %' Then 'Marianglas'
when Post_Code like 'LL74 %' Then 'Tyn y Gongl'
when Post_Code like 'LL75 %' Then 'Pentraeth'
when Post_Code like 'LL76 %' Then 'Llanbedrgoch'
when Post_Code like 'LL77 %' Then 'Llangefni'
when Post_Code like 'LL78 %' Then 'Brynteg'
when Post_Code like 'LN1 %' Then 'Lincoln'
when Post_Code like 'LN10 %' Then 'Woodhall Spa'
when Post_Code like 'LN11 %' Then 'Louth'
when Post_Code like 'LN12 %' Then 'Mablethorpe'
when Post_Code like 'LN13 %' Then 'Alford'
when Post_Code like 'LN2 %' Then 'Lincoln'
when Post_Code like 'LN3 %' Then 'Lincoln'
when Post_Code like 'LN4 %' Then 'Lincoln'
when Post_Code like 'LN5 %' Then 'Lincoln'
when Post_Code like 'LN6 %' Then 'Lincoln'
when Post_Code like 'LN7 %' Then 'Market Rasen'
when Post_Code like 'LN8 %' Then 'Market Rasen'
when Post_Code like 'LN9 %' Then 'Horncastle'
when Post_Code like 'LS12 %' Then 'Leeds'
when Post_Code like 'LS13 %' Then 'Leeds'
when Post_Code like 'LS14 %' Then 'Leeds'
when Post_Code like 'LS15 %' Then 'Leeds'
when Post_Code like 'LS16 %' Then 'Leeds'
when Post_Code like 'LS17 %' Then 'Leeds'
when Post_Code like 'LS18 %' Then 'Leeds'
when Post_Code like 'LS19 %' Then 'Leeds'
when Post_Code like 'LS20 %' Then 'Leeds'
when Post_Code like 'LS21 %' Then 'Otley'
when Post_Code like 'LS22 %' Then 'Wetherby'
when Post_Code like 'LS23 %' Then 'Wetherby'
when Post_Code like 'LS24 %' Then 'Tadcaster'
when Post_Code like 'LS25 %' Then 'Leeds'
when Post_Code like 'LS26 %' Then 'Leeds'
when Post_Code like 'LS27 %' Then 'Leeds'
when Post_Code like 'LS28 %' Then 'Pudsey'
when Post_Code like 'LS3 %' Then 'Leeds'
when Post_Code like 'LS4 %' Then 'Leeds'
when Post_Code like 'LS5 %' Then 'Leeds'
when Post_Code like 'LS7 %' Then 'Leeds'
when Post_Code like 'LS8 %' Then 'Leeds'
when Post_Code like 'LS9 %' Then 'Leeds'
when Post_Code like 'LS98 %' Then 'Leeds'
when Post_Code like 'LS99 %' Then 'Leeds'
when Post_Code like 'LU1 %' Then 'Luton'
when Post_Code like 'LU3 %' Then 'Luton'
when Post_Code like 'LU4 %' Then 'Luton'
when Post_Code like 'LU5 %' Then 'Dunstable'
when Post_Code like 'LU6 %' Then 'Dunstable'
when Post_Code like 'LU7 %' Then 'Leighton Buzzard'
when Post_Code like 'LU95 %' Then 'Luton'
when Post_Code like 'M11 %' Then 'Manchester'
when Post_Code like 'M12 %' Then 'Manchester'
when Post_Code like 'M13 %' Then 'Manchester'
when Post_Code like 'M14 %' Then 'Manchester'
when Post_Code like 'M15 %' Then 'Manchester'
when Post_Code like 'M16 %' Then 'Manchester'
when Post_Code like 'M18 %' Then 'Manchester'
when Post_Code like 'M19 %' Then 'Manchester'
when Post_Code like 'M21 %' Then 'Manchester'
when Post_Code like 'M22 %' Then 'Manchester'
when Post_Code like 'M23 %' Then 'Manchester'
when Post_Code like 'M24 %' Then 'Manchester'
when Post_Code like 'M25 %' Then 'Manchester'
when Post_Code like 'M26 %' Then 'Manchester'
when Post_Code like 'M27 %' Then 'Manchester'
when Post_Code like 'M28 %' Then 'Manchester'
when Post_Code like 'M29 %' Then 'Manchester'
when Post_Code like 'M30 %' Then 'Manchester'
when Post_Code like 'M31 %' Then 'Manchester'
when Post_Code like 'M32 %' Then 'Manchester'
when Post_Code like 'M33 %' Then 'Sale'
when Post_Code like 'M34 %' Then 'Manchester'
when Post_Code like 'M35 %' Then 'Manchester'
when Post_Code like 'M38 %' Then 'Manchester'
when Post_Code like 'M40 %' Then 'Manchester'
when Post_Code like 'M41 %' Then 'Manchester'
when Post_Code like 'M43 %' Then 'Manchester'
when Post_Code like 'M44 %' Then 'Manchester'
when Post_Code like 'M45 %' Then 'Manchester'
when Post_Code like 'M46 %' Then 'Manchester'
when Post_Code like 'M5 %' Then 'Salford'
when Post_Code like 'M50 %' Then 'Salford Quays'
when Post_Code like 'M6 %' Then 'Salford'
when Post_Code like 'M60 %' Then 'Manchester'
when Post_Code like 'M7 %' Then 'Salford'
when Post_Code like 'M8 %' Then 'Manchester'
when Post_Code like 'M9 %' Then 'Manchester'
when Post_Code like 'M90 %' Then 'Manchester'
when Post_Code like 'M99 %' Then 'Manchester'
when Post_Code like 'ME1 %' Then 'Rochester'
when Post_Code like 'ME10 %' Then 'Sittingbourne'
when Post_Code like 'ME11 %' Then 'Queenborough'
when Post_Code like 'ME12 %' Then 'Sheerness'
when Post_Code like 'ME13 %' Then 'Faversham'
when Post_Code like 'ME14 %' Then 'Maidstone'
when Post_Code like 'ME15 %' Then 'Maidstone'
when Post_Code like 'ME16 %' Then 'Maidstone'
when Post_Code like 'ME17 %' Then 'Maidstone'
when Post_Code like 'ME18 %' Then 'Maidstone'
when Post_Code like 'ME19 %' Then 'West Malling'
when Post_Code like 'ME2 %' Then 'Rochester'
when Post_Code like 'ME20 %' Then 'Aylesford'
when Post_Code like 'ME3 %' Then 'Rochester'
when Post_Code like 'ME4 %' Then 'Chatham'
when Post_Code like 'ME5 %' Then 'Chatham'
when Post_Code like 'ME6 %' Then 'Snodland'
when Post_Code like 'ME7 %' Then 'Gillingham'
when Post_Code like 'ME8 %' Then 'Gillingham'
when Post_Code like 'ME9 %' Then 'Sittingbourne'
when Post_Code like 'MK1 %' Then 'Milton Keynes'
when Post_Code like 'MK10 %' Then 'Milton Keynes'
when Post_Code like 'MK11 %' Then 'Milton Keynes'
when Post_Code like 'MK12 %' Then 'Milton Keynes'
when Post_Code like 'MK13 %' Then 'Milton Keynes'
when Post_Code like 'MK14 %' Then 'Milton Keynes'
when Post_Code like 'MK15 %' Then 'Milton Keynes'
when Post_Code like 'MK16 %' Then 'Newport Pagnell'
when Post_Code like 'MK17 %' Then 'Milton Keynes'
when Post_Code like 'MK18 %' Then 'Buckingham'
when Post_Code like 'MK19 %' Then 'Milton Keynes'
when Post_Code like 'MK2 %' Then 'Milton Keynes'
when Post_Code like 'MK3 %' Then 'Milton Keynes'
when Post_Code like 'MK4 %' Then 'Milton Keynes'
when Post_Code like 'MK40 %' Then 'Bedford'
when Post_Code like 'MK41 %' Then 'Bedford'
when Post_Code like 'MK42 %' Then 'Bedford'
when Post_Code like 'MK43 %' Then 'Bedford'
when Post_Code like 'MK44 %' Then 'Bedford'
when Post_Code like 'MK45 %' Then 'Bedford'
when Post_Code like 'MK46 %' Then 'Olney'
when Post_Code like 'MK5 %' Then 'Milton Keynes'
when Post_Code like 'MK6 %' Then 'Milton Keynes'
when Post_Code like 'MK7 %' Then 'Milton Keynes'
when Post_Code like 'MK8 %' Then 'Milton Keynes'
when Post_Code like 'ML1 %' Then 'Motherwell'
when Post_Code like 'ML10 %' Then 'Strathaven'
when Post_Code like 'ML11 %' Then 'Lanark'
when Post_Code like 'ML12 %' Then 'Biggar'
when Post_Code like 'ML2 %' Then 'Wishaw'
when Post_Code like 'ML3 %' Then 'Hamilton'
when Post_Code like 'ML4 %' Then 'Bellshill'
when Post_Code like 'ML5 %' Then 'Coatbridge'
when Post_Code like 'ML6 %' Then 'Airdrie'
when Post_Code like 'ML7 %' Then 'Shotts'
when Post_Code like 'ML8 %' Then 'Carluke'
when Post_Code like 'ML9 %' Then 'Larkhall'
when Post_Code like 'E5 %' Then 'London E5'
when Post_Code like 'N7 %' Then 'London N7'
when Post_Code like 'CR8 %' Then 'Purley'
when Post_Code like 'RM11 %' Then 'Hornchurch'
when Post_Code like 'SM3 %' Then 'Sutton'
when Post_Code like 'DA6 %' Then 'Bexleyheath'
when Post_Code like 'HA6 %' Then 'Northwood'
when Post_Code like 'N21 %' Then 'London N21'
when Post_Code like 'IG3 %' Then 'Ilford'
when Post_Code like 'SM5 %' Then 'Carshalton'
when Post_Code like 'DA16 %' Then 'Welling'
when Post_Code like 'NE10 %' Then 'Gateshead'
when Post_Code like 'NE12 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE13 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE15 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE16 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE17 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE18 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE19 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE20 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE21 %' Then 'Blaydon on Tyne'
when Post_Code like 'NE22 %' Then 'Bedlington'
when Post_Code like 'NE23 %' Then 'Cramlington'
when Post_Code like 'NE24 %' Then 'Blyth'
when Post_Code like 'NE25 %' Then 'Whitley Bay'
when Post_Code like 'NE26 %' Then 'Whitley Bay'
when Post_Code like 'NE27 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE28 %' Then 'Wallsend'
when Post_Code like 'NE29 %' Then 'North Shields'
when Post_Code like 'NE3 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE30 %' Then 'North Shields'
when Post_Code like 'NE31 %' Then 'Hebburn'
when Post_Code like 'NE32 %' Then 'Jarrow'
when Post_Code like 'NE33 %' Then 'South Shields'
when Post_Code like 'NE34 %' Then 'South Shields'
when Post_Code like 'NE35 %' Then 'Boldon Colliery'
when Post_Code like 'NE36 %' Then 'East Boldon'
when Post_Code like 'NE37 %' Then 'Washington'
when Post_Code like 'NE38 %' Then 'Washington'
when Post_Code like 'NE39 %' Then 'Rowlands Gill'
when Post_Code like 'NE4 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE40 %' Then 'Ryton'
when Post_Code like 'NE41 %' Then 'Wylam'
when Post_Code like 'NE42 %' Then 'Prudhoe'
when Post_Code like 'NE43 %' Then 'Stocksfield'
when Post_Code like 'NE44 %' Then 'Riding Mill'
when Post_Code like 'NE45 %' Then 'Corbridge'
when Post_Code like 'NE46 %' Then 'Hexham'
when Post_Code like 'NE47 %' Then 'Hexham'
when Post_Code like 'NE48 %' Then 'Hexham'
when Post_Code like 'NE49 %' Then 'Haltwhistle'
when Post_Code like 'NE5 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE6 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE61 %' Then 'Morpeth'
when Post_Code like 'NE62 %' Then 'Choppington'
when Post_Code like 'NE63 %' Then 'Ashington'
when Post_Code like 'NE64 %' Then 'Newbiggin By the'
when Post_Code like 'NE65 %' Then 'Morpeth'
when Post_Code like 'NE66 %' Then 'Alnwick'
when Post_Code like 'NE67 %' Then 'Chathill'
when Post_Code like 'NE68 %' Then 'Seahouses'
when Post_Code like 'NE69 %' Then 'Bamburgh'
when Post_Code like 'NE7 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE70 %' Then 'Belford'
when Post_Code like 'NE71 %' Then 'Wooler'
when Post_Code like 'NE8 %' Then 'Gateshead'
when Post_Code like 'NE88 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE9 %' Then 'Gateshead'
when Post_Code like 'NE98 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NE99 %' Then 'Newcastle Upon Tyne'
when Post_Code like 'NG10 %' Then 'Nottingham'
when Post_Code like 'NG11 %' Then 'Nottingham'
when Post_Code like 'NG12 %' Then 'Nottingham'
when Post_Code like 'NG13 %' Then 'Nottingham'
when Post_Code like 'NG14 %' Then 'Nottingham'
when Post_Code like 'NG15 %' Then 'Nottingham'
when Post_Code like 'NG16 %' Then 'Nottingham'
when Post_Code like 'NG17 %' Then 'Sutton in Ashfield'
when Post_Code like 'NG18 %' Then 'Mansfield'
when Post_Code like 'NG19 %' Then 'Mansfield'
when Post_Code like 'NG20 %' Then 'Mansfield'
when Post_Code like 'NG21 %' Then 'Mansfield'
when Post_Code like 'NG22 %' Then 'Newark'
when Post_Code like 'NG23 %' Then 'Newark'
when Post_Code like 'NG24 %' Then 'Newark'
when Post_Code like 'NG25 %' Then 'Southwell'
when Post_Code like 'NG3 %' Then 'Nottingham'
when Post_Code like 'NG31 %' Then 'Grantham'
when Post_Code like 'NG32 %' Then 'Grantham'
when Post_Code like 'NG33 %' Then 'Grantham'
when Post_Code like 'NG34 %' Then 'Sleaford'
when Post_Code like 'NG4 %' Then 'Nottingham'
when Post_Code like 'NG5 %' Then 'Nottingham'
when Post_Code like 'NG6 %' Then 'Nottingham'
when Post_Code like 'NG7 %' Then 'Nottingham'
when Post_Code like 'NG8 %' Then 'Nottingham'
when Post_Code like 'NG80 %' Then 'Nottingham'
when Post_Code like 'NG9 %' Then 'Nottingham'
when Post_Code like 'NG90 %' Then 'Beeston Business Park'
when Post_Code like 'NN1 %' Then 'Northampton'
when Post_Code like 'NN10 %' Then 'Rushden'
when Post_Code like 'NN11 %' Then 'Daventry'
when Post_Code like 'NN12 %' Then 'Towcester'
when Post_Code like 'NN13 %' Then 'Brackley'
when Post_Code like 'NN14 %' Then 'Kettering'
when Post_Code like 'NN15 %' Then 'Kettering'
when Post_Code like 'NN16 %' Then 'Kettering'
when Post_Code like 'NN17 %' Then 'Corby'
when Post_Code like 'NN18 %' Then 'Corby'
when Post_Code like 'NN2 %' Then 'Northampton'
when Post_Code like 'NN29 %' Then 'Wellingborough'
when Post_Code like 'NN3 %' Then 'Northampton'
when Post_Code like 'NN4 %' Then 'Northampton'
when Post_Code like 'NN5 %' Then 'Northampton'
when Post_Code like 'NN6 %' Then 'Northampton'
when Post_Code like 'NN7 %' Then 'Northampton'
when Post_Code like 'NN8 %' Then 'Wellingborough'
when Post_Code like 'NN9 %' Then 'Wellingborough'
when Post_Code like 'NP1 %' Then 'Newport'
when Post_Code like 'NP10 %' Then 'Newport'
when Post_Code like 'NP11 %' Then 'Newport'
when Post_Code like 'NP12 %' Then 'Blackwood'
when Post_Code like 'NP13 %' Then 'Abertillery'
when Post_Code like 'NP15 %' Then 'Usk'
when Post_Code like 'NP16 %' Then 'Chepstow'
when Post_Code like 'NP18 %' Then 'Newport'
when Post_Code like 'NP19 %' Then 'Newport'
when Post_Code like 'NP2 %' Then 'Newport'
when Post_Code like 'NP20 %' Then 'Newport'
when Post_Code like 'NP22 %' Then 'Tredegar'
when Post_Code like 'NP23 %' Then 'Ebbw Vale'
when Post_Code like 'NP24 %' Then 'New Tredegar'
when Post_Code like 'NP25 %' Then 'Monmouth'
when Post_Code like 'NP26 %' Then 'Caldicot'
when Post_Code like 'NP3 %' Then 'Newport'
when Post_Code like 'NP4 %' Then 'Pontypool'
when Post_Code like 'NP44 %' Then 'Cwmbran'
when Post_Code like 'NP5 %' Then 'Newport'
when Post_Code like 'NP6 %' Then 'Newport'
when Post_Code like 'NP7 %' Then 'Abergavenny'
when Post_Code like 'NP8 %' Then 'Crickhowell'
when Post_Code like 'NP9 %' Then 'Newport'
when Post_Code like 'NR1 %' Then 'Norwich'
when Post_Code like 'NR10 %' Then 'Norwich'
when Post_Code like 'NR11 %' Then 'Norwich'
when Post_Code like 'NR12 %' Then 'Norwich'
when Post_Code like 'NR13 %' Then 'Norwich'
when Post_Code like 'NR14 %' Then 'Norwich'
when Post_Code like 'NR15 %' Then 'Norwich'
when Post_Code like 'NR16 %' Then 'Norwich'
when Post_Code like 'NR17 %' Then 'Attleborough'
when Post_Code like 'NR18 %' Then 'Wymondham'
when Post_Code like 'NR19 %' Then 'Dereham'
when Post_Code like 'NR20 %' Then 'Dereham'
when Post_Code like 'NR21 %' Then 'Fakenham'
when Post_Code like 'NR22 %' Then 'Walsingham'
when Post_Code like 'NR25 %' Then 'Holt'
when Post_Code like 'NR26 %' Then 'Sheringham'
when Post_Code like 'NR27 %' Then 'Cromer'
when Post_Code like 'NR28 %' Then 'North Walsham'
when Post_Code like 'NR29 %' Then 'Great Yarmouth'
when Post_Code like 'NR30 %' Then 'Great Yarmouth'
when Post_Code like 'NR31 %' Then 'Great Yarmouth'
when Post_Code like 'NR32 %' Then 'Lowestoft'
when Post_Code like 'NR33 %' Then 'Lowestoft'
when Post_Code like 'NR34 %' Then 'Beccles'
when Post_Code like 'NR35 %' Then 'Bungay'
when Post_Code like 'NR4 %' Then 'Norwich'
when Post_Code like 'NR5 %' Then 'Norwich'
when Post_Code like 'NR7 %' Then 'Norwich'
when Post_Code like 'NR8 %' Then 'Norwich'
when Post_Code like 'NR9 %' Then 'Norwich'
when Post_Code like 'HA8 %' Then 'Edgware'
when Post_Code like 'HA5 %' Then 'Pinner'
when Post_Code like 'TW15 %' Then 'Ashford'
when Post_Code like 'NW7 %' Then 'London NW7'
when Post_Code like 'TN13 %' Then 'Sevenoaks'
when Post_Code like 'OL1 %' Then 'Oldham'
when Post_Code like 'OL10 %' Then 'Heywood'
when Post_Code like 'OL11 %' Then 'Rochdale'
when Post_Code like 'OL12 %' Then 'Rochdale'
when Post_Code like 'OL13 %' Then 'Bacup'
when Post_Code like 'OL14 %' Then 'Todmorden'
when Post_Code like 'OL15 %' Then 'Littleborough'
when Post_Code like 'OL16 %' Then 'Rochdale'
when Post_Code like 'OL2 %' Then 'Oldham'
when Post_Code like 'OL3 %' Then 'Oldham'
when Post_Code like 'OL4 %' Then 'Oldham'
when Post_Code like 'OL5 %' Then 'Ashton Under Lyne'
when Post_Code like 'OL6 %' Then 'Ashton Under Lyne'
when Post_Code like 'OL7 %' Then 'Ashton Under Lyne'
when Post_Code like 'OL8 %' Then 'Oldham'
when Post_Code like 'OL9 %' Then 'Oldham'
when Post_Code like 'OX10 %' Then 'Wallingford'
when Post_Code like 'OX11 %' Then 'Didcot'
when Post_Code like 'OX12 %' Then 'Wantage'
when Post_Code like 'OX13 %' Then 'Abingdon'
when Post_Code like 'OX15 %' Then 'Banbury'
when Post_Code like 'OX16 %' Then 'Banbury'
when Post_Code like 'OX17 %' Then 'Banbury'
when Post_Code like 'OX18 %' Then 'Carterton'
when Post_Code like 'OX20 %' Then 'Woodstock'
when Post_Code like 'OX25 %' Then 'Middleton Stoney'
when Post_Code like 'OX26 %' Then 'Bicester'
when Post_Code like 'OX27 %' Then 'NE of Bicester'
when Post_Code like 'OX28 %' Then 'Central Witney'
when Post_Code like 'OX29 %' Then 'Witneys Hinterland'
when Post_Code like 'OX33 %' Then 'Oxford'
when Post_Code like 'OX39 %' Then 'Chinnor'
when Post_Code like 'OX44 %' Then 'Oxford'
when Post_Code like 'OX49 %' Then 'Watlington'
when Post_Code like 'OX5 %' Then 'Kidlington'
when Post_Code like 'OX6 %' Then 'OX25 OX26'
when Post_Code like 'OX7 %' Then 'Chipping Norton'
when Post_Code like 'OX8 %' Then 'OX25 OX26'
when Post_Code like 'OX9 %' Then 'Thame'
when Post_Code like 'PA1 %' Then 'Paisley'
when Post_Code like 'PA10 %' Then 'Johnstone'
when Post_Code like 'PA11 %' Then 'Bridge of Weir'
when Post_Code like 'PA12 %' Then 'Lochwinnoch'
when Post_Code like 'PA13 %' Then 'Kilmacolm'
when Post_Code like 'PA14 %' Then 'Port Glasgow'
when Post_Code like 'PA15 %' Then 'Greenock'
when Post_Code like 'PA16 %' Then 'Greenock'
when Post_Code like 'PA17 %' Then 'Skelmorlie'
when Post_Code like 'PA18 %' Then 'Wemyss Bay'
when Post_Code like 'PA19 %' Then 'Gourock'
when Post_Code like 'PA2 %' Then 'Paisley'
when Post_Code like 'PA20 %' Then 'Rothesay'
when Post_Code like 'PA21 %' Then 'Tighnabruaich'
when Post_Code like 'PA22 %' Then 'Colintraive'
when Post_Code like 'PA23 %' Then 'Dunoon'
when Post_Code like 'PA24 %' Then 'Cairndow'
when Post_Code like 'PA25 %' Then 'Cairndow'
when Post_Code like 'PA26 %' Then 'Cairndow'
when Post_Code like 'PA27 %' Then 'Cairndow'
when Post_Code like 'PA28 %' Then 'Campbeltown'
when Post_Code like 'PA29 %' Then 'Tarbert'
when Post_Code like 'PA3 %' Then 'Paisley'
when Post_Code like 'PA30 %' Then 'Lochgilphead'
when Post_Code like 'PA31 %' Then 'Lochgilphead'
when Post_Code like 'PA32 %' Then 'Inveraray'
when Post_Code like 'PA33 %' Then 'Dalmally'
when Post_Code like 'PA34 %' Then 'Oban'
when Post_Code like 'PA35 %' Then 'Taynuilt'
when Post_Code like 'PA36 %' Then 'Bridge of Orchy'
when Post_Code like 'PA37 %' Then 'Oban'
when Post_Code like 'PA38 %' Then 'Appin'
when Post_Code like 'PA4 %' Then 'Renfrew'
when Post_Code like 'PA41 %' Then 'Isle of Gigha'
when Post_Code like 'PA42 %' Then 'Port Ellen'
when Post_Code like 'PA43 %' Then 'Bowmore'
when Post_Code like 'PA44 %' Then 'Bridgend'
when Post_Code like 'PA45 %' Then 'Ballygrant'
when Post_Code like 'PA46 %' Then 'Port Askaig'
when Post_Code like 'PA47 %' Then 'Portnahaven'
when Post_Code like 'PA48 %' Then 'Port Charlotte'
when Post_Code like 'PA49 %' Then 'Bruichladdich'
when Post_Code like 'PA5 %' Then 'Johnstone'
when Post_Code like 'PA6 %' Then 'Johnstone'
when Post_Code like 'PA60 %' Then 'Craighouse'
when Post_Code like 'PA61 %' Then 'Isle of Colonsay'
when Post_Code like 'PA62 %' Then 'Isle of Mull'
when Post_Code like 'PA63 %' Then 'Paisley'
when Post_Code like 'PA64 %' Then 'Isle of Mull'
when Post_Code like 'PA65 %' Then 'Isle of Mull'
when Post_Code like 'PA66 %' Then 'Isle of Mull'
when Post_Code like 'PA67 %' Then 'Isle of Mull'
when Post_Code like 'PA68 %' Then 'Paisley'
when Post_Code like 'PA69 %' Then 'Isle of Mull'
when Post_Code like 'PA7 %' Then 'Bishopton'
when Post_Code like 'PA70 %' Then 'Isle of Mull'
when Post_Code like 'PA71 %' Then 'Isle of Mull'
when Post_Code like 'PA72 %' Then 'Isle of Mull'
when Post_Code like 'PA73 %' Then 'Isle of Mull'
when Post_Code like 'PA74 %' Then 'Paisley'
when Post_Code like 'PA75 %' Then 'Isle of Mull'
when Post_Code like 'PA76 %' Then 'Isle of Iona'
when Post_Code like 'PA77 %' Then 'Scarinish'
when Post_Code like 'PA78 %' Then 'Isle of Coll'
when Post_Code like 'PA8 %' Then 'Erskine'
when Post_Code like 'PA9 %' Then 'Johnstone'
when Post_Code like 'PE1 %' Then 'Peterborough'
when Post_Code like 'PE10 %' Then 'Bourne'
when Post_Code like 'PE11 %' Then 'Spalding'
when Post_Code like 'PE12 %' Then 'Spalding'
when Post_Code like 'PE13 %' Then 'Wisbech'
when Post_Code like 'PE14 %' Then 'Wisbech'
when Post_Code like 'PE15 %' Then 'March'
when Post_Code like 'PE16 %' Then 'Chatteris'
when Post_Code like 'PE19 %' Then 'Huntingdon'
when Post_Code like 'PE2 %' Then 'Peterborough'
when Post_Code like 'PE20 %' Then 'Boston'
when Post_Code like 'PE21 %' Then 'Boston'
when Post_Code like 'PE22 %' Then 'Boston'
when Post_Code like 'PE23 %' Then 'Spilsby'
when Post_Code like 'PE24 %' Then 'Skegness'
when Post_Code like 'PE25 %' Then 'Skegness'
when Post_Code like 'PE26 %' Then 'Huntingdon'
when Post_Code like 'PE27 %' Then 'S+B2113t Ives'
when Post_Code like 'PE28 %' Then 'Huntingdon'
when Post_Code like 'PE29 %' Then 'Huntingdon'
when Post_Code like 'PE3 %' Then 'Peterborough'
when Post_Code like 'PE30 %' Then 'Kings Lynn'
when Post_Code like 'PE31 %' Then 'Kings Lynn'
when Post_Code like 'PE32 %' Then 'Kings Lynn'
when Post_Code like 'PE33 %' Then 'Kings Lynn'
when Post_Code like 'PE34 %' Then 'Kings Lynn'
when Post_Code like 'PE35 %' Then 'Sandringham'
when Post_Code like 'PE36 %' Then 'Hunstanton'
when Post_Code like 'PE37 %' Then 'Swaffham'
when Post_Code like 'PE38 %' Then 'Downham Market'
when Post_Code like 'PE4 %' Then 'Peterborough'
when Post_Code like 'PE5 %' Then 'Peterborough'
when Post_Code like 'PE6 %' Then 'Peterborough'
when Post_Code like 'PE7 %' Then 'Peterborough'
when Post_Code like 'PE8 %' Then 'Peterborough'
when Post_Code like 'PH1 %' Then 'Perth'
when Post_Code like 'PH10 %' Then 'Blairgowrie'
when Post_Code like 'PH11 %' Then 'Blairgowrie'
when Post_Code like 'PH12 %' Then 'Blairgowrie'
when Post_Code like 'PH13 %' Then 'Blairgowrie'
when Post_Code like 'PH14 %' Then 'Perth'
when Post_Code like 'PH15 %' Then 'Aberfeldy'
when Post_Code like 'PH16 %' Then 'Pitlochry'
when Post_Code like 'PH17 %' Then 'Pitlochry'
when Post_Code like 'PH18 %' Then 'Pitlochry'
when Post_Code like 'PH19 %' Then 'Dalwhinnie'
when Post_Code like 'PH2 %' Then 'Perth'
when Post_Code like 'PH20 %' Then 'Newtonmore'
when Post_Code like 'PH21 %' Then 'Kingussie'
when Post_Code like 'PH22 %' Then 'Aviemore'
when Post_Code like 'PH23 %' Then 'Carrbridge'
when Post_Code like 'PH24 %' Then 'Boat of Garten'
when Post_Code like 'PH25 %' Then 'Nethy Bridge'
when Post_Code like 'PH26 %' Then 'Grantown on Spey'
when Post_Code like 'PH3 %' Then 'Auchterarder'
when Post_Code like 'PH30 %' Then 'Corrour'
when Post_Code like 'PH31 %' Then 'Roy Bridge'
when Post_Code like 'PH32 %' Then 'Fort Augustus'
when Post_Code like 'PH33 %' Then 'Fort William'
when Post_Code like 'PH34 %' Then 'Spean Bridge'
when Post_Code like 'PH35 %' Then 'Invergarry'
when Post_Code like 'PH36 %' Then 'Acharacle'
when Post_Code like 'PH37 %' Then 'Glenfinnan'
when Post_Code like 'PH38 %' Then 'Lochailort'
when Post_Code like 'PH39 %' Then 'Arisaig'
when Post_Code like 'PH4 %' Then 'Auchterarder'
when Post_Code like 'PH40 %' Then 'Mallaig'
when Post_Code like 'PH41 %' Then 'Mallaig'
when Post_Code like 'PH42 %' Then 'Isle of Eigg'
when Post_Code like 'PH43 %' Then 'Isle of Rhum'
when Post_Code like 'PH44 %' Then 'Isle of Canna'
when Post_Code like 'PH49 %' Then 'Ballachulish'
when Post_Code like 'PH5 %' Then 'Crieff'
when Post_Code like 'PH50 %' Then 'Kinlochleven'
when Post_Code like 'PH6 %' Then 'Crieff'
when Post_Code like 'PH7 %' Then 'Crieff'
when Post_Code like 'PH8 %' Then 'Dunkeld'
when Post_Code like 'PH9 %' Then 'Pitlochry'
when Post_Code like 'PL1 %' Then 'Plymouth'
when Post_Code like 'PL10 %' Then 'Torpoint'
when Post_Code like 'PL11 %' Then 'Torpoint'
when Post_Code like 'PL12 %' Then 'Saltash'
when Post_Code like 'PL13 %' Then 'Looe'
when Post_Code like 'PL14 %' Then 'Liskeard'
when Post_Code like 'PL15 %' Then 'Launceston'
when Post_Code like 'PL16 %' Then 'Lifton'
when Post_Code like 'PL17 %' Then 'Callington'
when Post_Code like 'PL18 %' Then 'Cornwall'
when Post_Code like 'PL19 %' Then 'Tavistock'
when Post_Code like 'PL2 %' Then 'Plymouth'
when Post_Code like 'PL20 %' Then 'Yelverton'
when Post_Code like 'PL21 %' Then 'Ivybridge'
when Post_Code like 'PL22 %' Then 'Lostwithiel'
when Post_Code like 'PL23 %' Then 'Fowey'
when Post_Code like 'PL24 %' Then 'Par'
when Post_Code like 'PL25 %' Then 'St. Austell'
when Post_Code like 'PL26 %' Then 'St. Austell'
when Post_Code like 'PL27 %' Then 'Wadebridge'
when Post_Code like 'PL28 %' Then 'Padstow'
when Post_Code like 'PL29 %' Then 'Port Isaac'
when Post_Code like 'PL3 %' Then 'Plymouth'
when Post_Code like 'PL30 %' Then 'Bodmin'
when Post_Code like 'PL31 %' Then 'Bodmin'
when Post_Code like 'PL32 %' Then 'Camelford'
when Post_Code like 'PL33 %' Then 'Delabole'
when Post_Code like 'PL34 %' Then 'Tintagel'
when Post_Code like 'PL35 %' Then 'Boscastle'
when Post_Code like 'PL4 %' Then 'Plymouth'
when Post_Code like 'PL5 %' Then 'Plymouth'
when Post_Code like 'PL6 %' Then 'Plymouth'
when Post_Code like 'PL7 %' Then 'Plymouth'
when Post_Code like 'PL8 %' Then 'Plymouth'
when Post_Code like 'PL9 %' Then 'Plymouth'
when Post_Code like 'PO10 %' Then 'Emsworth'
when Post_Code like 'PO11 %' Then 'Hayling Island'
when Post_Code like 'PO12 %' Then 'Gosport'
when Post_Code like 'PO13 %' Then 'Gosport'
when Post_Code like 'PO14 %' Then 'Fareham'
when Post_Code like 'PO16 %' Then 'Fareham'
when Post_Code like 'PO17 %' Then 'Fareham'
when Post_Code like 'PO18 %' Then 'Chichester'
when Post_Code like 'PO2 %' Then 'Portsmouth'
when Post_Code like 'PO20 %' Then 'Chichester'
when Post_Code like 'PO21 %' Then 'Bognor Regis'
when Post_Code like 'PO22 %' Then 'Bognor Regis'
when Post_Code like 'PO3 %' Then 'Portsmouth'
when Post_Code like 'PO30 %' Then 'Newport'
when Post_Code like 'PO31 %' Then 'Cowes'
when Post_Code like 'PO32 %' Then 'East Cowes'
when Post_Code like 'PO33 %' Then 'Ryde'
when Post_Code like 'PO34 %' Then 'Seaview'
when Post_Code like 'PO35 %' Then 'Bembridge'
when Post_Code like 'PO36 %' Then 'Sandown'
when Post_Code like 'PO37 %' Then 'Shanklin'
when Post_Code like 'PO38 %' Then 'Ventnor'
when Post_Code like 'PO39 %' Then 'Totland Bay'
when Post_Code like 'PO4 %' Then 'Southsea'
when Post_Code like 'PO40 %' Then 'Freshwater'
when Post_Code like 'PO41 %' Then 'Yarmouth'
when Post_Code like 'PO5 %' Then 'Southsea'
when Post_Code like 'PO6 %' Then 'Portsmouth'
when Post_Code like 'PO7 %' Then 'Waterlooville'
when Post_Code like 'PO8 %' Then 'Waterlooville'
when Post_Code like 'PO9 %' Then 'Havant'
when Post_Code like 'PR0 %' Then 'Preston'
when Post_Code like 'PR1 %' Then 'Preston'
when Post_Code like 'PR2 %' Then 'Preston'
when Post_Code like 'PR25 %' Then 'Leyland'
when Post_Code like 'PR26 %' Then 'Croston'
when Post_Code like 'PR3 %' Then 'Preston'
when Post_Code like 'PR4 %' Then 'Preston'
when Post_Code like 'PR5 %' Then 'Preston'
when Post_Code like 'PR6 %' Then 'Chorley'
when Post_Code like 'PR7 %' Then 'Chorley'
when Post_Code like 'PR8 %' Then 'Southport'
when Post_Code like 'PR9 %' Then 'Southport'
when Post_Code like 'RG10 %' Then 'Reading'
when Post_Code like 'RG12 %' Then 'Bracknell'
when Post_Code like 'RG14 %' Then 'Newbury'
when Post_Code like 'RG17 %' Then 'Hungerford'
when Post_Code like 'RG18 %' Then 'Thatcham'
when Post_Code like 'RG19 %' Then 'Thatcham'
when Post_Code like 'RG2 %' Then 'Reading'
when Post_Code like 'RG20 %' Then 'Newbury'
when Post_Code like 'RG21 %' Then 'Basingstoke'
when Post_Code like 'RG22 %' Then 'Basingstoke'
when Post_Code like 'RG23 %' Then 'Basingstoke'
when Post_Code like 'RG24 %' Then 'Basingstoke'
when Post_Code like 'RG25 %' Then 'Basingstoke'
when Post_Code like 'RG26 %' Then 'Tadley'
when Post_Code like 'RG27 %' Then 'Hook'
when Post_Code like 'RG28 %' Then 'Whitchurch'
when Post_Code like 'RG29 %' Then 'Hook'
when Post_Code like 'RG30 %' Then 'Reading'
when Post_Code like 'RG31 %' Then 'Reading'
when Post_Code like 'RG4 %' Then 'Reading'
when Post_Code like 'RG40 %' Then 'Wokingham'
when Post_Code like 'RG41 %' Then 'Wokingham'
when Post_Code like 'RG42 %' Then 'Bracknell'
when Post_Code like 'RG45 %' Then 'Berkshire'
when Post_Code like 'RG5 %' Then 'Reading'
when Post_Code like 'RG6 %' Then 'Reading'
when Post_Code like 'RG7 %' Then 'Reading'
when Post_Code like 'RG8 %' Then 'Reading'
when Post_Code like 'UB2 %' Then 'Southall'
when Post_Code like 'RH11 %' Then 'Crawley'
when Post_Code like 'RH14 %' Then 'Billingshurst'
when Post_Code like 'RH15 %' Then 'Burgess Hill'
when Post_Code like 'RH17 %' Then 'Haywards Heath'
when Post_Code like 'RH18 %' Then 'Forest Row'
when Post_Code like 'RH19 %' Then 'East Grinstead'
when Post_Code like 'TW3 %' Then 'Hounslow'
when Post_Code like 'RH20 %' Then 'Pulborough'
when Post_Code like 'RH3 %' Then 'Betchworth'
when Post_Code like 'RH5 %' Then 'Dorking'
when Post_Code like 'RH7 %' Then 'Lingfield'
when Post_Code like 'SE26 %' Then 'London SE26'
when Post_Code like 'RM10 %' Then 'Dagenham'
when Post_Code like 'WD19 %' Then 'South Oxhey'
when Post_Code like 'E18 %' Then 'London E18'
when Post_Code like 'RM15 %' Then 'South Ockendon'
when Post_Code like 'DA15 %' Then 'Sidcup'
when Post_Code like 'W7 %' Then 'London W7'
when Post_Code like 'RM16 %' Then 'Grays'
when Post_Code like 'RM17 %' Then 'Grays'
when Post_Code like 'RM18 %' Then 'Tilbury'
when Post_Code like 'WD23 %' Then 'Bushey'
when Post_Code like 'RM20 %' Then 'Grays'
when Post_Code like 'UB10 %' Then 'Uxbridge'
when Post_Code like 'KT15 %' Then 'Addlestone'
when Post_Code like 'GU23 %' Then 'Woking'
when Post_Code like 'SE12 %' Then 'London SE12'
when Post_Code like 'IG2 %' Then 'Ilford'
when Post_Code like 'SE19 %' Then 'London SE19'
when Post_Code like 'S10 %' Then 'Sheffield'
when Post_Code like 'S11 %' Then 'Sheffield'
when Post_Code like 'S12 %' Then 'Sheffield'
when Post_Code like 'S13 %' Then 'Sheffield'
when Post_Code like 'S14 %' Then 'Sheffield'
when Post_Code like 'S17 %' Then 'Sheffield'
when Post_Code like 'S18 %' Then 'Sheffield'
when Post_Code like 'S2 %' Then 'Sheffield'
when Post_Code like 'S20 %' Then 'Sheffield'
when Post_Code like 'S21 %' Then 'Sheffield'
when Post_Code like 'S25 %' Then 'Sheffield'
when Post_Code like 'S26 %' Then 'Sheffield'
when Post_Code like 'S3 %' Then 'Sheffield'
when Post_Code like 'S32 %' Then 'Hope Valley'
when Post_Code like 'S33 %' Then 'Hope Valley'
when Post_Code like 'S35 %' Then 'Sheffield'
when Post_Code like 'S36 %' Then 'Sheffield'
when Post_Code like 'S4 %' Then 'Sheffield'
when Post_Code like 'S40 %' Then 'Chesterfield'
when Post_Code like 'S41 %' Then 'Chesterfield'
when Post_Code like 'S42 %' Then 'Chesterfield'
when Post_Code like 'S43 %' Then 'Chesterfield'
when Post_Code like 'S44 %' Then 'Chesterfield'
when Post_Code like 'S45 %' Then 'Chesterfield'
when Post_Code like 'S49 %' Then 'Chesterfield'
when Post_Code like 'S5 %' Then 'Sheffield'
when Post_Code like 'S6 %' Then 'Sheffield'
when Post_Code like 'S60 %' Then 'Rotherham'
when Post_Code like 'S61 %' Then 'Rotherham'
when Post_Code like 'S62 %' Then 'Rotherham'
when Post_Code like 'S63 %' Then 'Rotherham'
when Post_Code like 'S64 %' Then 'Mexborough'
when Post_Code like 'S65 %' Then 'Rotherham'
when Post_Code like 'S66 %' Then 'Rotherham'
when Post_Code like 'S7 %' Then 'Sheffield'
when Post_Code like 'S70 %' Then 'Barnsley'
when Post_Code like 'S71 %' Then 'Barnsley'
when Post_Code like 'S72 %' Then 'Barnsley'
when Post_Code like 'S73 %' Then 'Barnsley'
when Post_Code like 'S74 %' Then 'Barnsley'
when Post_Code like 'S75 %' Then 'Barnsley'
when Post_Code like 'S8 %' Then 'Sheffield'
when Post_Code like 'S80 %' Then 'Worksop'
when Post_Code like 'S81 %' Then 'Worksop'
when Post_Code like 'SA1 %' Then 'Swansea'
when Post_Code like 'SA10 %' Then 'Neath'
when Post_Code like 'SA11 %' Then 'Neath'
when Post_Code like 'SA12 %' Then 'Port Talbot'
when Post_Code like 'SA13 %' Then 'Port Talbot'
when Post_Code like 'SA14 %' Then 'Llanelli'
when Post_Code like 'SA15 %' Then 'Llanelli'
when Post_Code like 'SA16 %' Then 'Burry Port'
when Post_Code like 'SA17 %' Then 'Kidwelly'
when Post_Code like 'SA18 %' Then 'Ammanford'
when Post_Code like 'SA19 %' Then 'Llandeilo'
when Post_Code like 'SA2 %' Then 'Swansea'
when Post_Code like 'SA20 %' Then 'Llandovery'
when Post_Code like 'SA3 %' Then 'Swansea'
when Post_Code like 'SA31 %' Then 'Carmarthen'
when Post_Code like 'SA32 %' Then 'Carmarthen'
when Post_Code like 'SA33 %' Then 'Carmarthen'
when Post_Code like 'SA34 %' Then 'Whitland'
when Post_Code like 'SA35 %' Then 'Llanfyrnach'
when Post_Code like 'SA36 %' Then 'Glogue'
when Post_Code like 'SA37 %' Then 'Boncath'
when Post_Code like 'SA38 %' Then 'Newcastle Emlyn'
when Post_Code like 'SA39 %' Then 'Pencader'
when Post_Code like 'SA4 %' Then 'Swansea'
when Post_Code like 'SA40 %' Then 'Llanybydder'
when Post_Code like 'SA41 %' Then 'Crymych'
when Post_Code like 'SA42 %' Then 'Newport'
when Post_Code like 'SA43 %' Then 'Cardigan'
when Post_Code like 'SA44 %' Then 'Llandysul'
when Post_Code like 'SA45 %' Then 'New Quay'
when Post_Code like 'SA46 %' Then 'Aberaeron'
when Post_Code like 'SA47 %' Then 'Llanarth'
when Post_Code like 'SA48 %' Then 'Lampeter'
when Post_Code like 'SA5 %' Then 'Swansea'
when Post_Code like 'SA6 %' Then 'Swansea'
when Post_Code like 'SA61 %' Then 'Haverfordwest'
when Post_Code like 'SA62 %' Then 'Haverfordwest'
when Post_Code like 'SA63 %' Then 'Clarbeston Road'
when Post_Code like 'SA64 %' Then 'Fishguard'
when Post_Code like 'SA65 %' Then 'Fishguard'
when Post_Code like 'SA66 %' Then 'Clynderwen'
when Post_Code like 'SA67 %' Then 'Narberth'
when Post_Code like 'SA68 %' Then 'Kilgetty'
when Post_Code like 'SA69 %' Then 'Saundersfoot'
when Post_Code like 'SA7 %' Then 'Swansea'
when Post_Code like 'SA70 %' Then 'Tenby'
when Post_Code like 'SA71 %' Then 'Pembroke'
when Post_Code like 'SA72 %' Then 'Pembroke Dock'
when Post_Code like 'SA73 %' Then 'Milford Haven'
when Post_Code like 'SA8 %' Then 'Swansea'
when Post_Code like 'SA9 %' Then 'Swansea'
when Post_Code like 'SA99 %' Then 'Swansea'
when Post_Code like 'SE11 %' Then 'London SE11'
when Post_Code like 'SE22 %' Then 'London SE22'
when Post_Code like 'SE8 %' Then 'London SE8'
when Post_Code like 'SE14 %' Then 'London SE14'
when Post_Code like 'SM2 %' Then 'Sutton'
when Post_Code like 'SE24 %' Then 'London SE24'
when Post_Code like 'DA7 %' Then 'Bexleyheath'
when Post_Code like 'SW20 %' Then 'London SW20'
when Post_Code like 'SE7 %' Then 'London SE7'
when Post_Code like 'SE23 %' Then 'London SE23'
when Post_Code like 'SE27 %' Then 'London SE27'
when Post_Code like 'BR8 %' Then 'Swanley'
when Post_Code like 'KT14 %' Then 'West Byfleet'
when Post_Code like 'RM6 %' Then 'Romford'
when Post_Code like 'SM7 %' Then 'Banstead'
when Post_Code like 'N11 %' Then 'London N11'
when Post_Code like 'SE4 %' Then 'London SE4'
when Post_Code like 'DA5 %' Then 'Bexley'
when Post_Code like 'WD18 %' Then 'West Watford'
when Post_Code like 'IG7 %' Then 'Chigwell'
when Post_Code like 'WD4 %' Then 'Kings Langley'
when Post_Code like 'KT20 %' Then 'Tadworth'
when Post_Code like 'RM5 %' Then 'Romford'
when Post_Code like 'RM9 %' Then 'Dagenham'
when Post_Code like 'IG5 %' Then 'Ilford'
when Post_Code like 'SG1 %' Then 'Stevenage'
when Post_Code like 'SG10 %' Then 'Much Hadham'
when Post_Code like 'SG11 %' Then 'Ware'
when Post_Code like 'SG13 %' Then 'Hertford'
when Post_Code like 'SG14 %' Then 'Hertford'
when Post_Code like 'SG15 %' Then 'Arlesey'
when Post_Code like 'SG16 %' Then 'Henlow'
when Post_Code like 'SG17 %' Then 'Shefford'
when Post_Code like 'SG18 %' Then 'Biggleswade'
when Post_Code like 'SG19 %' Then 'Sandy'
when Post_Code like 'SG2 %' Then 'Stevenage'
when Post_Code like 'SG3 %' Then 'Knebworth'
when Post_Code like 'SG4 %' Then 'Hitchin'
when Post_Code like 'SG6 %' Then 'Letchworth'
when Post_Code like 'SG7 %' Then 'Baldock'
when Post_Code like 'SG8 %' Then 'Royston'
when Post_Code like 'SG9 %' Then 'Buntingford'
when Post_Code like 'SK1 %' Then 'Stockport'
when Post_Code like 'SK10 %' Then 'Macclesfield'
when Post_Code like 'SK11 %' Then 'Macclesfield'
when Post_Code like 'SK12 %' Then 'Stockport'
when Post_Code like 'SK13 %' Then 'Glossop'
when Post_Code like 'SK14 %' Then 'Hyde'
when Post_Code like 'SK15 %' Then 'Stalybridge'
when Post_Code like 'SK16 %' Then 'Dukinfield'
when Post_Code like 'SK17 %' Then 'Buxton'
when Post_Code like 'SK2 %' Then 'Stockport'
when Post_Code like 'SK22 %' Then 'High Peak'
when Post_Code like 'SK23 %' Then 'High Peak'
when Post_Code like 'SK3 %' Then 'Stockport'
when Post_Code like 'SK4 %' Then 'Stockport'
when Post_Code like 'SK5 %' Then 'Stockport'
when Post_Code like 'SK6 %' Then 'Stockport'
when Post_Code like 'SK7 %' Then 'Stockport'
when Post_Code like 'IG4 %' Then 'Ilford'
when Post_Code like 'SL1 %' Then 'Slough'
when Post_Code like 'SL2 %' Then 'Slough'
when Post_Code like 'SL3 %' Then 'Slough'
when Post_Code like 'SL8 %' Then 'Bourne End'
when Post_Code like 'SW16 %' Then 'London SW16'
when Post_Code like 'IG9 %' Then 'Buckhurst Hill'
when Post_Code like 'N5 %' Then 'London N5'
when Post_Code like 'TW18 %' Then 'Staines'
when Post_Code like 'DA17 %' Then 'Belvedere'
when Post_Code like 'RH9 %' Then 'Godstone'
when Post_Code like 'CM5 %' Then 'Ongar'
when Post_Code like 'SN1 %' Then 'Swindon'
when Post_Code like 'SN10 %' Then 'Devizes'
when Post_Code like 'SN11 %' Then 'Calne'
when Post_Code like 'SN12 %' Then 'Melksham'
when Post_Code like 'SN13 %' Then 'Corsham'
when Post_Code like 'SN14 %' Then 'Chippenham'
when Post_Code like 'SN15 %' Then 'Chippenham'
when Post_Code like 'SN16 %' Then 'Malmesbury'
when Post_Code like 'SN2 %' Then 'Swindon'
when Post_Code like 'SN25 %' Then 'Swindon'
when Post_Code like 'SN26 %' Then 'Swindon'
when Post_Code like 'SN3 %' Then 'Swindon'
when Post_Code like 'SN38 %' Then 'Swindon'
when Post_Code like 'SN5 %' Then 'Swindon'
when Post_Code like 'SN6 %' Then 'Swindon'
when Post_Code like 'SN7 %' Then 'Faringdon'
when Post_Code like 'SN8 %' Then 'Marlborough'
when Post_Code like 'SN9 %' Then 'Pewsey'
when Post_Code like 'SO1 %' Then 'Southampton'
when Post_Code like 'SO16 %' Then 'Southampton'
when Post_Code like 'SO17 %' Then 'Southampton'
when Post_Code like 'SO19 %' Then 'Southampton'
when Post_Code like 'SO2 %' Then 'Southampton'
when Post_Code like 'SO20 %' Then 'Stockbridge'
when Post_Code like 'SO22 %' Then 'Winchester'
when Post_Code like 'SO24 %' Then 'Alresford'
when Post_Code like 'SO3 %' Then 'Southampton'
when Post_Code like 'SO30 %' Then 'Southampton'
when Post_Code like 'SO31 %' Then 'Southampton'
when Post_Code like 'SO32 %' Then 'Southampton'
when Post_Code like 'SO4 %' Then 'Southampton'
when Post_Code like 'SO40 %' Then 'Southampton'
when Post_Code like 'SO42 %' Then 'Brockenhurst'
when Post_Code like 'SO43 %' Then 'Lyndhurst'
when Post_Code like 'SO45 %' Then 'Southampton'
when Post_Code like 'SO5 %' Then 'Southampton'
when Post_Code like 'SO50 %' Then 'Eastleigh'
when Post_Code like 'SO51 %' Then 'Romsey'
when Post_Code like 'SO52 %' Then 'Southampton'
when Post_Code like 'SO53 %' Then 'Eastleigh'
when Post_Code like 'SO9 %' Then 'Southampton'
when Post_Code like 'SP1 %' Then 'Salisbury'
when Post_Code like 'SP10 %' Then 'Andover'
when Post_Code like 'SP11 %' Then 'Andover'
when Post_Code like 'SP2 %' Then 'Salisbury'
when Post_Code like 'SP3 %' Then 'Salisbury'
when Post_Code like 'SP4 %' Then 'Salisbury'
when Post_Code like 'SP5 %' Then 'Salisbury'
when Post_Code like 'SP6 %' Then 'Fordingbridge'
when Post_Code like 'SP7 %' Then 'Shaftesbury'
when Post_Code like 'SP8 %' Then 'Gillingham'
when Post_Code like 'SP9 %' Then 'Tidworth'
when Post_Code like 'SR1 %' Then 'Sunderland'
when Post_Code like 'SR2 %' Then 'Sunderland'
when Post_Code like 'SR3 %' Then 'Sunderland'
when Post_Code like 'SR4 %' Then 'Sunderland'
when Post_Code like 'SR5 %' Then 'Sunderland'
when Post_Code like 'SR6 %' Then 'Sunderland'
when Post_Code like 'SR7 %' Then 'Seaham'
when Post_Code like 'SR8 %' Then 'Peterlee'
when Post_Code like 'SR9 %' Then 'Sunderland'
when Post_Code like 'SS0 %' Then 'Westcliff on Sea'
when Post_Code like 'SS1 %' Then 'Southend on Sea'
when Post_Code like 'SS11 %' Then 'Wickford'
when Post_Code like 'SS12 %' Then 'Wickford'
when Post_Code like 'SS13 %' Then 'Basildon'
when Post_Code like 'SS14 %' Then 'Basildon'
when Post_Code like 'SS15 %' Then 'Basildon'
when Post_Code like 'SS16 %' Then 'Basildon'
when Post_Code like 'SS17 %' Then 'Stanford le Hope'
when Post_Code like 'SS2 %' Then 'Southend on Sea'
when Post_Code like 'SS3 %' Then 'Southend on Sea'
when Post_Code like 'SS4 %' Then 'Rochford'
when Post_Code like 'SS5 %' Then 'Hockley'
when Post_Code like 'SS6 %' Then 'Rayleigh'
when Post_Code like 'SS7 %' Then 'Benfleet'
when Post_Code like 'SS8 %' Then 'Canvey Island'
when Post_Code like 'SS9 %' Then 'Leigh on Sea'
when Post_Code like 'SS99 %' Then 'Southend on Sea'
when Post_Code like 'ST1 %' Then 'Stoke on Trent'
when Post_Code like 'ST10 %' Then 'Stoke on Trent'
when Post_Code like 'ST11 %' Then 'Stoke on Trent'
when Post_Code like 'ST12 %' Then 'Stoke on Trent'
when Post_Code like 'ST13 %' Then 'Leek'
when Post_Code like 'ST14 %' Then 'Uttoxeter'
when Post_Code like 'ST15 %' Then 'Stone'
when Post_Code like 'ST16 %' Then 'Stafford'
when Post_Code like 'ST17 %' Then 'Stafford'
when Post_Code like 'ST18 %' Then 'Stafford'
when Post_Code like 'ST19 %' Then 'Stafford'
when Post_Code like 'ST2 %' Then 'Stoke on Trent'
when Post_Code like 'ST20 %' Then 'Stafford'
when Post_Code like 'ST21 %' Then 'Stafford'
when Post_Code like 'ST3 %' Then 'Stoke on Trent'
when Post_Code like 'ST4 %' Then 'Stoke on Trent'
when Post_Code like 'ST5 %' Then 'Newcastle'
when Post_Code like 'ST6 %' Then 'Stoke on Trent'
when Post_Code like 'ST7 %' Then 'Stoke on Trent'
when Post_Code like 'ST8 %' Then 'Stoke on Trent'
when Post_Code like 'ST9 %' Then 'Stoke on Trent'
when Post_Code like 'UB7 %' Then 'West Drayton'
when Post_Code like 'N12 %' Then 'London N12'
when Post_Code like 'CM14 %' Then 'Brentwood'
when Post_Code like 'N3 %' Then 'London N3'
when Post_Code like 'SE2 %' Then 'London SE2'
when Post_Code like 'KT12 %' Then 'Walton on Thames'
when Post_Code like 'DA4 %' Then 'Dartford'
when Post_Code like 'SY1 %' Then 'Shrewsbury'
when Post_Code like 'SY10 %' Then 'Oswestry'
when Post_Code like 'SY11 %' Then 'Oswestry'
when Post_Code like 'SY12 %' Then 'Ellesmere'
when Post_Code like 'SY13 %' Then 'Whitchurch'
when Post_Code like 'SY14 %' Then 'Malpas'
when Post_Code like 'SY15 %' Then 'Montgomery'
when Post_Code like 'SY16 %' Then 'Newtown'
when Post_Code like 'SY17 %' Then 'Powys'
when Post_Code like 'SY18 %' Then 'Llanidloes'
when Post_Code like 'SY19 %' Then 'Llanbrynmair'
when Post_Code like 'SY2 %' Then 'Shrewsbury'
when Post_Code like 'SY20 %' Then 'Machynlleth'
when Post_Code like 'SY21 %' Then 'Welshpool'
when Post_Code like 'SY22 %' Then 'Llanfyllin'
when Post_Code like 'SY23 %' Then 'Aberystwyth'
when Post_Code like 'SY24 %' Then 'Dyfed'
when Post_Code like 'SY25 %' Then 'Dyfed'
when Post_Code like 'SY3 %' Then 'Shrewsbury'
when Post_Code like 'SY4 %' Then 'Shrewsbury'
when Post_Code like 'SY5 %' Then 'Shrewsbury'
when Post_Code like 'SY6 %' Then 'Church Stretton'
when Post_Code like 'SY7 %' Then 'Shropshire'
when Post_Code like 'SY9 %' Then 'Bishops Castle'
when Post_Code like 'TA1 %' Then 'Taunton'
when Post_Code like 'TA10 %' Then 'Langport'
when Post_Code like 'TA11 %' Then 'Somerton'
when Post_Code like 'TA12 %' Then 'Martock'
when Post_Code like 'TA13 %' Then 'South Petherton'
when Post_Code like 'TA14 %' Then 'Stoke Sub Hamdon'
when Post_Code like 'TA15 %' Then 'Montacute'
when Post_Code like 'TA16 %' Then 'Merriott'
when Post_Code like 'TA17 %' Then 'Hinton St. George'
when Post_Code like 'TA18 %' Then 'Crewkerne'
when Post_Code like 'TA19 %' Then 'Ilminster'
when Post_Code like 'TA2 %' Then 'Taunton'
when Post_Code like 'TA20 %' Then 'Chard'
when Post_Code like 'TA21 %' Then 'Wellington'
when Post_Code like 'TA22 %' Then 'Dulverton'
when Post_Code like 'TA23 %' Then 'Watchet'
when Post_Code like 'TA24 %' Then 'Minehead'
when Post_Code like 'TA3 %' Then 'Taunton'
when Post_Code like 'TA4 %' Then 'Taunton'
when Post_Code like 'TA5 %' Then 'Bridgwater'
when Post_Code like 'TA6 %' Then 'Bridgwater'
when Post_Code like 'TA7 %' Then 'Bridgwater'
when Post_Code like 'TA8 %' Then 'Burnham on Sea'
when Post_Code like 'TA9 %' Then 'Highbridge'
when Post_Code like 'TD1 %' Then 'Galashiels'
when Post_Code like 'TD10 %' Then 'Duns'
when Post_Code like 'TD11 %' Then 'Duns'
when Post_Code like 'TD12 %' Then 'Cornhill-on-Tweed'
when Post_Code like 'TD13 %' Then 'Cockburnspath'
when Post_Code like 'TD14 %' Then 'Eyemouth'
when Post_Code like 'TD15 %' Then 'Berwick Upon Tweed'
when Post_Code like 'TD2 %' Then 'Lauder'
when Post_Code like 'TD3 %' Then 'Gordon'
when Post_Code like 'TD4 %' Then 'Earlston'
when Post_Code like 'TD5 %' Then 'Kelso'
when Post_Code like 'TD6 %' Then 'Melrose'
when Post_Code like 'TD7 %' Then 'Selkirk'
when Post_Code like 'TD8 %' Then 'Jedburgh'
when Post_Code like 'TD9 %' Then 'Roxburghshire'
when Post_Code like 'TF1 %' Then 'Telford'
when Post_Code like 'TF10 %' Then 'Newport'
when Post_Code like 'TF11 %' Then 'Shifnal'
when Post_Code like 'TF12 %' Then 'Broseley'
when Post_Code like 'TF13 %' Then 'Much Wenlock'
when Post_Code like 'TF2 %' Then 'Telford'
when Post_Code like 'TF3 %' Then 'Telford'
when Post_Code like 'TF4 %' Then 'Telford'
when Post_Code like 'TF5 %' Then 'Telford'
when Post_Code like 'TF6 %' Then 'Telford'
when Post_Code like 'TF7 %' Then 'Telford'
when Post_Code like 'TF8 %' Then 'Telford'
when Post_Code like 'TF9 %' Then 'Market Drayton'
when Post_Code like 'TN10 %' Then 'Tonbridge'
when Post_Code like 'TN11 %' Then 'Tonbridge'
when Post_Code like 'TN12 %' Then 'Tonbridge'
when Post_Code like 'TN15 %' Then 'Sevenoaks'
when Post_Code like 'TN17 %' Then 'Cranbrook'
when Post_Code like 'TN18 %' Then 'Cranbrook'
when Post_Code like 'TN19 %' Then 'Etchingham'
when Post_Code like 'TN2 %' Then 'Tunbridge Wells'
when Post_Code like 'TN20 %' Then 'Mayfield'
when Post_Code like 'TN21 %' Then 'Heathfield'
when Post_Code like 'TN22 %' Then 'Uckfield'
when Post_Code like 'TN23 %' Then 'Ashford'
when Post_Code like 'TN24 %' Then 'Ashford'
when Post_Code like 'TN25 %' Then 'Ashford'
when Post_Code like 'TN26 %' Then 'Ashford'
when Post_Code like 'TN27 %' Then 'Ashford'
when Post_Code like 'TN28 %' Then 'New Romney'
when Post_Code like 'TN29 %' Then 'Romney Marsh'
when Post_Code like 'TN3 %' Then 'Tunbridge Wells'
when Post_Code like 'TN30 %' Then 'Tenterden'
when Post_Code like 'TN31 %' Then 'Rye'
when Post_Code like 'TN32 %' Then 'Robertsbridge'
when Post_Code like 'TN33 %' Then 'Battle'
when Post_Code like 'TN34 %' Then 'Hastings'
when Post_Code like 'TN35 %' Then 'Hastings'
when Post_Code like 'TN36 %' Then 'Winchelsea'
when Post_Code like 'TN37 %' Then 'St. Le'
when Post_Code like 'TN38 %' Then 'St. Le'
when Post_Code like 'TN39 %' Then 'Bexhill on Sea'
when Post_Code like 'TN4 %' Then 'Tunbridge Wells'
when Post_Code like 'TN40 %' Then 'Bexhill on Sea'
when Post_Code like 'TN5 %' Then 'Wadhurst'
when Post_Code like 'TN6 %' Then 'Crowborough'
when Post_Code like 'TN7 %' Then 'Hartfield'
when Post_Code like 'TN8 %' Then 'Edenbridge'
when Post_Code like 'TN9 %' Then 'Tonbridge'
when Post_Code like 'TQ1 %' Then 'Torquay'
when Post_Code like 'TQ10 %' Then 'South Brent'
when Post_Code like 'TQ11 %' Then 'Buckfastleigh'
when Post_Code like 'TQ12 %' Then 'Newton Abbot'
when Post_Code like 'TQ13 %' Then 'Newton Abbot'
when Post_Code like 'TQ14 %' Then 'Teignmouth'
when Post_Code like 'TQ2 %' Then 'Torquay'
when Post_Code like 'TQ3 %' Then 'Paignton'
when Post_Code like 'TQ4 %' Then 'Paignton'
when Post_Code like 'TQ5 %' Then 'Brixham'
when Post_Code like 'TQ6 %' Then 'Dartmouth'
when Post_Code like 'TQ7 %' Then 'Kingsbridge'
when Post_Code like 'TQ8 %' Then 'Salcombe'
when Post_Code like 'TQ9 %' Then 'Totnes'
when Post_Code like 'TR1 %' Then 'Truro'
when Post_Code like 'TR10 %' Then 'Penryn'
when Post_Code like 'TR11 %' Then 'Falmouth'
when Post_Code like 'TR12 %' Then 'Helston'
when Post_Code like 'TR13 %' Then 'Helston'
when Post_Code like 'TR14 %' Then 'Camborne'
when Post_Code like 'TR15 %' Then 'Redruth'
when Post_Code like 'TR16 %' Then 'Redruth'
when Post_Code like 'TR17 %' Then 'Marazion'
when Post_Code like 'TR18 %' Then 'Penzance'
when Post_Code like 'TR19 %' Then 'Penzance'
when Post_Code like 'TR2 %' Then 'Truro'
when Post_Code like 'TR20 %' Then 'Penzance'
when Post_Code like 'TR21 %' Then 'St. Marys'
when Post_Code like 'TR22 %' Then 'St. Agnes'
when Post_Code like 'TR23 %' Then 'Bryher'
when Post_Code like 'TR24 %' Then 'Tresco'
when Post_Code like 'TR25 %' Then 'St. Martins'
when Post_Code like 'TR26 %' Then 'St. Ives'
when Post_Code like 'TR27 %' Then 'Hayle'
when Post_Code like 'TR3 %' Then 'Truro'
when Post_Code like 'TR4 %' Then 'Truro'
when Post_Code like 'TR5 %' Then 'St. Agnes'
when Post_Code like 'TR6 %' Then 'Perranporth'
when Post_Code like 'TR7 %' Then 'Newquay'
when Post_Code like 'TR8 %' Then 'Newquay'
when Post_Code like 'TR9 %' Then 'St. Columb'
when Post_Code like 'TR93 %' Then 'Penzance'
when Post_Code like 'TS1 %' Then 'Middlesbrough'
when Post_Code like 'TS10 %' Then 'Redcar'
when Post_Code like 'TS11 %' Then 'Redcar'
when Post_Code like 'TS12 %' Then 'Saltbu'
when Post_Code like 'TS13 %' Then 'Saltbu'
when Post_Code like 'TS14 %' Then 'Guisborough'
when Post_Code like 'TS16 %' Then 'Stockton on Tees'
when Post_Code like 'TS17 %' Then 'Stockton on Tees'
when Post_Code like 'TS18 %' Then 'Stockton on Tees'
when Post_Code like 'TS19 %' Then 'Stockton on Tees'
when Post_Code like 'TS2 %' Then 'Middlesbrough'
when Post_Code like 'TS20 %' Then 'Stockton on Tees'
when Post_Code like 'TS21 %' Then 'Stockton on Tees'
when Post_Code like 'TS22 %' Then 'Billingham'
when Post_Code like 'TS23 %' Then 'Billingham'
when Post_Code like 'TS24 %' Then 'Hartlepool'
when Post_Code like 'TS25 %' Then 'Hartlepool'
when Post_Code like 'TS26 %' Then 'Hartlepool'
when Post_Code like 'TS27 %' Then 'Hartlepool'
when Post_Code like 'TS28 %' Then 'Wingate'
when Post_Code like 'TS29 %' Then 'Trimdon Station'
when Post_Code like 'TS3 %' Then 'Middlesbrough'
when Post_Code like 'TS4 %' Then 'Middlesbrough'
when Post_Code like 'TS5 %' Then 'Middlesbrough'
when Post_Code like 'TS6 %' Then 'Middlesbrough'
when Post_Code like 'TS7 %' Then 'Middlesbrough'
when Post_Code like 'TS8 %' Then 'Middlesbrough'
when Post_Code like 'TS9 %' Then 'Middlesbrough'
when Post_Code like 'TS90 %' Then 'Middlesbrough'
when Post_Code like 'SW12 %' Then 'London SW12'
when Post_Code like 'TN14 %' Then 'Sevenoaks'
when Post_Code like 'TW14 %' Then 'Feltham'
when Post_Code like 'SE21 %' Then 'London SE21'
when Post_Code like 'RM2 %' Then 'Romford'
when Post_Code like 'TW2 %' Then 'Twickenham'
when Post_Code like 'CM16 %' Then 'Epping'
when Post_Code like 'UB1 %' Then 'Southall'
when Post_Code like 'UB9 %' Then 'Uxbridge'
when Post_Code like 'KT21 %' Then 'Ashtead'
when Post_Code like 'SW2 %' Then 'London SW2'
when Post_Code like 'SW14 %' Then 'London SW14'
when Post_Code like 'TN16 %' Then 'Westerham'
when Post_Code like 'TW4 %' Then 'Hounslow'
when Post_Code like 'WD7 %' Then 'Radlett'
when Post_Code like 'CM13 %' Then 'Brentwood'
when Post_Code like 'TW5 %' Then 'Hounslow'
when Post_Code like 'SL0 %' Then 'Iver'
when Post_Code like 'WA1 %' Then 'Warrington'
when Post_Code like 'WA10 %' Then 'St. Helens'
when Post_Code like 'WA11 %' Then 'St. Helens'
when Post_Code like 'WA12 %' Then 'Newton le Willows'
when Post_Code like 'WA13 %' Then 'Lymm'
when Post_Code like 'WA2 %' Then 'Warrington'
when Post_Code like 'WA3 %' Then 'Warrington'
when Post_Code like 'WA4 %' Then 'Warrington'
when Post_Code like 'WA5 %' Then 'Warrington'
when Post_Code like 'WA55 %' Then 'Warrington'
when Post_Code like 'WA6 %' Then 'Warrington'
when Post_Code like 'WA7 %' Then 'Runcorn'
when Post_Code like 'WA8 %' Then 'Widnes'
when Post_Code like 'WA9 %' Then 'St. Helens'
when Post_Code like 'E18 %' Then 'London E18'
when Post_Code like 'SW99 %' Then 'London SW99'
when Post_Code like 'KT24 %' Then 'Leatherhead'
when Post_Code like 'CR6 %' Then 'Warlingham'
when Post_Code like 'KT23 %' Then 'Leatherhead'
when Post_Code like 'SE28 %' Then 'London SE28'
when Post_Code like 'RM4 %' Then 'Romford'
when Post_Code like 'RM19 %' Then 'Purfleet'
when Post_Code like 'DA18 %' Then 'Erith'
when Post_Code like 'WD1 %' Then 'WD17 etc'
when Post_Code like 'WD2 %' Then 'WD24 etc'
when Post_Code like 'WF1 %' Then 'Wakefield'
when Post_Code like 'WF11 %' Then 'Knottingley'
when Post_Code like 'WF12 %' Then 'Dewsbury'
when Post_Code like 'WF13 %' Then 'Dewsbury'
when Post_Code like 'WF14 %' Then 'Mirfield'
when Post_Code like 'WF15 %' Then 'Liversedge'
when Post_Code like 'WF16 %' Then 'Heckmondwike'
when Post_Code like 'WF17 %' Then 'Batley'
when Post_Code like 'WF2 %' Then 'Wakefield'
when Post_Code like 'WF3 %' Then 'Wakefield'
when Post_Code like 'WF4 %' Then 'Wakefield'
when Post_Code like 'WF5 %' Then 'Ossett'
when Post_Code like 'WF6 %' Then 'Normanton'
when Post_Code like 'WF7 %' Then 'Pontefract'
when Post_Code like 'WF8 %' Then 'Pontefract'
when Post_Code like 'WF9 %' Then 'Pontefract'
when Post_Code like 'WN1 %' Then 'Wigan'
when Post_Code like 'WN2 %' Then 'Wigan'
when Post_Code like 'WN3 %' Then 'Wigan'
when Post_Code like 'WN4 %' Then 'Wigan'
when Post_Code like 'WN5 %' Then 'Wigan'
when Post_Code like 'WN6 %' Then 'Wigan'
when Post_Code like 'WN7 %' Then 'Leigh'
when Post_Code like 'WN8 %' Then 'Skelmersdale'
when Post_Code like 'WR10 %' Then 'Pershore'
when Post_Code like 'WR11 %' Then 'Evesham'
when Post_Code like 'WR12 %' Then 'Broadway'
when Post_Code like 'WR13 %' Then 'Malvern'
when Post_Code like 'WR14 %' Then 'Malvern'
when Post_Code like 'WR15 %' Then 'Tenbury Wells'
when Post_Code like 'WR2 %' Then 'Worcester'
when Post_Code like 'WR3 %' Then 'Worcester'
when Post_Code like 'WR4 %' Then 'Worcester'
when Post_Code like 'WR5 %' Then 'Worcester'
when Post_Code like 'WR6 %' Then 'Worcester'
when Post_Code like 'WR7 %' Then 'Worcester'
when Post_Code like 'WR8 %' Then 'Worcester'
when Post_Code like 'WR9 %' Then 'Droitwich'
when Post_Code like 'WR99 %' Then 'Worcester'
when Post_Code like 'WS1 %' Then 'Walsall'
when Post_Code like 'WS10 %' Then 'Wednesbury'
when Post_Code like 'WS11 %' Then 'Cannock'
when Post_Code like 'WS12 %' Then 'Cannock'
when Post_Code like 'WS13 %' Then 'Lichfield'
when Post_Code like 'WS14 %' Then 'Lichfield'
when Post_Code like 'WS15 %' Then 'Rugeley'
when Post_Code like 'WS2 %' Then 'Walsall'
when Post_Code like 'WS3 %' Then 'Walsall'
when Post_Code like 'WS4 %' Then 'Walsall'
when Post_Code like 'WS5 %' Then 'Walsall'
when Post_Code like 'WS6 %' Then 'Walsall'
when Post_Code like 'WS7 %' Then 'Burntwood'
when Post_Code like 'WS8 %' Then 'Walsall'
when Post_Code like 'WS9 %' Then 'Walsall'
when Post_Code like 'WV10 %' Then 'Wolverhampton'
when Post_Code like 'WV11 %' Then 'Wolverhampton'
when Post_Code like 'WV12 %' Then 'Willenhall'
when Post_Code like 'WV13 %' Then 'Willenhall'
when Post_Code like 'WV14 %' Then 'Bilston'
when Post_Code like 'WV15 %' Then 'Bridgnorth'
when Post_Code like 'WV16 %' Then 'Bridgnorth'
when Post_Code like 'WV2 %' Then 'Wolverhampton'
when Post_Code like 'WV3 %' Then 'Wolverhampton'
when Post_Code like 'WV4 %' Then 'Wolverhampton'
when Post_Code like 'WV5 %' Then 'Wolverhampton'
when Post_Code like 'WV6 %' Then 'Wolverhampton'
when Post_Code like 'WV7 %' Then 'Wolverhampton'
when Post_Code like 'WV8 %' Then 'Wolverhampton'
when Post_Code like 'WV9 %' Then 'Wolverhampton'
when Post_Code like 'YO10 %' Then 'York'
when Post_Code like 'YO11 %' Then 'Scarborough'
when Post_Code like 'YO12 %' Then 'Scarborough'
when Post_Code like 'YO13 %' Then 'Scarborough'
when Post_Code like 'YO14 %' Then 'Filey'
when Post_Code like 'YO15 %' Then 'Bridlington'
when Post_Code like 'YO16 %' Then 'Bridlington'
when Post_Code like 'YO17 %' Then 'Malton'
when Post_Code like 'YO18 %' Then 'Pickering'
when Post_Code like 'YO2 %' Then 'York'
when Post_Code like 'YO21 %' Then 'Whitby'
when Post_Code like 'YO22 %' Then 'Whitby'
when Post_Code like 'YO23 %' Then 'York'
when Post_Code like 'YO24 %' Then 'York'
when Post_Code like 'YO25 %' Then 'Driffield'
when Post_Code like 'YO26 %' Then 'York'
when Post_Code like 'YO3 %' Then 'York'
when Post_Code like 'YO30 %' Then 'York'
when Post_Code like 'YO32 %' Then 'York'
when Post_Code like 'YO4 %' Then 'York'
when Post_Code like 'YO41 %' Then 'York'
when Post_Code like 'YO42 %' Then 'York'
when Post_Code like 'YO43 %' Then 'York'
when Post_Code like 'YO5 %' Then 'York'
when Post_Code like 'YO51 %' Then 'York'
when Post_Code like 'YO6 %' Then 'York'
when Post_Code like 'YO60 %' Then 'York'
when Post_Code like 'YO61 %' Then 'York'
when Post_Code like 'YO62 %' Then 'York'
when Post_Code like 'YO7 %' Then 'Thirsk'
when Post_Code like 'YO8 %' Then 'Selby'
when Post_Code like 'YO90 %' Then 'York'
when Post_Code like 'YO91 %' Then 'York'
when Post_Code like 'UB11 %' Then 'Uxbridge'
when Post_Code like 'ZE1 %' Then 'Shetland Islands'
when Post_Code like 'ZE2 %' Then 'Shetland'
when Post_Code like 'ZE3 %' Then 'Shetland'
ELSE Post_Code END AS Segmentation
from #accountbuild



select
--[FDMSAccountNo],
Seller_Code,
mcc_code,
chain_chain_no,
Dba_name,
se_number,
pca,
post_code,
rolling12,
Segmentation,
into #test
FROM
(
SELECT [FDMSAccountNo]
Seller_Code,
mcc_code,
chain_chain_no,
Dba_name,
se_number,
pca,
post_code,
rolling12,
Segmentation,
ROW_NUMBER() OVER (PARTITION BY [FDMSAccountNo] ORDER BY [FDMSAccountNo] DESC) AS N
from #final
) s
where N=1








Go to Top of Page

masond
Constraint Violating Yak Guru

447 Posts

Posted - 08/12/2013 :  05:00:11  Show Profile  Reply with Quote
Resolved the issue

please ignore this post
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 9.87 seconds. Powered By: Snitz Forums 2000