begin for f1 in (Select lev.showlevel,lev.article from smstocklevels lev where lev.storeloc = 20) loop update smstocklevels lv set lv.showlevel = f1.showlevel where lv.article = f1.article and lv.storeloc = 99; commit; end loop; end;
update supermag.smstocklevels set showlevel=round(showlevel/3) where showlevel>0 and article in ( select article from supermag.smcard where idclass in ( select id from supermag.sacardclass where tree in ('63.6.17.3.', '63.6.17.7.', '63.6.17.9.') ) );