数据加载中……

2011年9月7日

trigger

create or replace trigger pm4h_hw_db.t_get_sys_bhstore
  after insert on pm4h_ad.sys_bhstore
declare
  pragma autonomous_transaction;
  tablename varchar2(64);
  cursor cr is
    select bhtable from pm4h_ad.sys_bhstore where bhmodelid = 'TODBH';
begin
  open cr;
  fetch cr
    into tablename;
  while cr%found loop
    if fun_is_exists_table(tablename) = 0 then
      pm4h_hw_db.create_bh_table(tablename);
    end if;
    fetch cr
      into tablename;
  end loop;
  close cr;
end pm4h_hw_db.t_get_sys_bhstore;

posted @ 2011-09-07 16:45 陈碧滔 阅读(113) | 评论 (0)编辑 收藏