update RDS.T_RECIPE r
set r.FrlloId = fed.frllorecipe_id
from RDS.T_EXPORT_FRLLO_RECIPE_DATA fed
where fed.ObjId = r.RecipeID and fed.frllorecipe_id is not null;

update RDS.T_RECIPE_ELEMENT re
set re.FrlloId = fed.frllorecipe_id
from RDS.T_EXPORT_FRLLO_RECIPE_DATA fed
where fed.ObjId = re.RecipeElementID and fed.frllorecipe_id is not null;


ALTER TABLE RDS.T_EXPORT_FRLLO_RECIPE_DATA ADD "regnum" varchar(100) NULL;

update RDS.T_EXPORT_FRLLO_RECIPE_DATA set RegNum = FrlloId, FrlloId = FrlloRecipe_id;

ALTER TABLE RDS.T_EXPORT_FRLLO_RECIPE_DATA DROP COLUMN "frllorecipe_id";