createorreplace procedure delete_test_users(likecount invarchar2) is
likecount2 varchar2(30); begin
likecount2 :=likecount ||'%';
deletefrom TEST_USER_ROLE t where t.user_id like likecount2; deletefrom TEST_STRU_TYPE_REF t where t.user_id like likecount2; deletefrom TEST_USER_PROXY t where t.user_id like likecount2 or t.proxy_user_id like likecount2; deletefrom TEST_USER_DATAREF t where t.user_id like likecount2; commit; deletefrom TEST_USERS t where t.user_id like likecount2; commit; end delete_test_users;
createorreplace procedure delete_test_stru_organ is
p_stru_id varchar2(30);
p_organ_id varchar2(30); begin
p_stru_id :='Sp_stru_id00113';
p_organ_id :='Op_organ_id0113'; deletefrom test_stru where STRU_ID=p_stru_id; deletefrom test_organ where organ_id=p_organ_id; deletefrom test_stru t where t.organ_id like 'vorgan_id%'; deletefrom test_organ t where t.organ_id like 'vorgan_id%'; commit; end delete_test_stru_organ;