 ;
 
 --then insert into f_map (also look for domains)
-*/
+
 ;
 --make Suppliers, some clean up
 UPDATE THIN_NEED_TO_MAP

;
update ds_stage a  set ingredient_concept_code = (select new_code from code_replace b where a.ingredient_concept_code = b.old_code)
where exists (select 1 from code_replace b where a.ingredient_concept_code = b.old_code)
;
commit
;

--how to make plural: add 's' or 'y' replace with 'ies'
--apply the same algotithm as used for ingredients
--Execution time: 3m 28s when "mm" is used
 
drop table f_map;
create table f_map as ( -- enhanced algorithm added  lower (a.thin_name) like lower '% '||(b.concept_name)||' %'
select * from 
