IF object_id('tempdb..#tmpTable') IS NOT NULL  
DROP TABLE [dbo].[#tmpTable]  
		
CREATE TABLE #tmpTable
(
   ZoneType Varchar(50),
   ExtRef INT
)

-- **** all the mapping list provided from CFA should be inserted here 
INSERT INTO #tmpTable 
Values 
	('Location - DistributorName',470),
('Location - ConceptCode',471),
('Location - DistributionCenter',473),
('Location - LocationCode',475),
('Location - OperatorTeamName',477)
-- **** 


Declare @ZoneType VARCHAR(50), @extref VARCHAR(50)
-- declare a cursor
DECLARE sample_cursor CURSOR FOR 
SELECT ZoneType,ExtRef from #tmpTable

-- open cursor and fetch first row into variables
OPEN sample_cursor
FETCH NEXT FROM sample_cursor into @ZoneType,@extref

-- check for a new row
WHILE @@FETCH_STATUS=0
BEGIN
-- do complex operation here
PRINT 'Zone Type: ' + CAST(@ZoneType as varchar(12)) + ' Ext Ref: ' + @extref

update tbZoneType set ZoneTypeExtRef = @extref where ZoneType = @ZoneType 

-- get next available row into variables
FETCH NEXT FROM sample_cursor into @ZoneType,@extref 
END
close sample_cursor
Deallocate sample_cursor

DROP TABLE #tmpTable

--select * from tbZoneType 