create table #HOLD (
...
property varchar(50),
...
record_state char(1)
)
####
-- (a) Report new values
select distinct property
from #HOLD
where property not in (select property from table2)
-- (b) Mark records containing those new values
update #HOLD set record_state='N'
where property not in (select property from table2)
-- (c) Generate new dictionary items (assumes auto-incrementing ID column)
insert table2 (property)
select distinct property
from #HOLD
where property not in (select property from table2)
-- (d) Delete records containing an unknown value (assumes you didn't
-- add new dictionary items)
delete #HOLD
where property not in (select property from table2)
####
-- Alter any records needing update
update table1 set
....
property_id = T2.id
....
from table1 T1
join #HOLD H on H.PrimaryKeyColumn=T1.PrimaryKeyColumn
join table2 T2 on T2.property = H.property
where T1.property_id is null or T1.property_id != T2.id
-- Insert new records
insert table1 (..., property_id, ...)
select ..., T2.id as property_id, ...
from #HOLD H
where H.PrimaryKeyColumn not in (
select PrimaryKeyColumn
from table1
)