do $$
declare
r_id bigint;
begin


FOR r_id IN
select id from persis.workplace 
where id in (select medstafffact_id from tmp.tmp_PROMEDWEB93980 )
limit 1

LOOP
perform persis.p_WorkPlace_upd (workplace_id => r_id, isreload=>1);
END LOOP;
end $$
