create or replace procedure sp_config_setting2 is menuCd varchar(4); menuUrl varchar(200); cursor curTb is select menu_cd, menu_url from menu where menu_ctg = 'A' and use_yn = 'Y' and menu_view_yn = 'Y'; begin open curTb; loop fetch curTb into menuCd, menuUrl; EXIT WHEN curTb%NOTFOUND; if menuUrl is not null then if instr(menuUrl, '냠냠냨') = '0' then dbms_output.put_line(menuCd || '=' || menuUrl || '-' || instr(menuUrl, '냠냠냠')); update menu set menu_url = '냠냠냠' where menu_cd = menuCd; end if; end if; end loop; close curTb; end; --execute sp_config_setting2(); --DROP PROCEDURE sp_config_setting2;
프로시저 예제
2012. 10. 24. 13:20