do $$
declare 
r record;

begin

for r in (select * from rls.drugcomplexmnnname) LOOP
			update rls.drugcomplexmnnname 
			set drugcomplexmnnname_name = (select drugcomplexmnnname_name from tmp.rls_drugcomplexmnnname where drugcomplexmnnname_id = r.drugcomplexmnnname_id) 
			where drugcomplexmnnname_id = r.drugcomplexmnnname_id;

end LOOP;


end $$
