oracle8.1.6 select survey_id as asm_id,name as asm_name from surveys declare begin :1 := rule.new( rule_id => :rule_id, rule_name => :rule_name, asm_id => :asm_id, active_p => :active_p ); end; select rule_name from rules where rule_id=$rule_id select a.name from rules r, surveys a where a.survey_id=r.asm_id and r.rule_id=:rule_id select survey_id as asm_id,name as asm_name from surveys begin rule.del(:rule_id); end; insert into rules_triggers (rule_def_id,qs_id,result_id,active_p,rule_id) values (trigger_seq.nextval, :qs_id, :result_id, :active_p, :rule_id) delete from rules_triggers where rule_def_id=:rule_def_id insert into rules_actions (rule_action_id,action_type,group_id,rule_id,active_p) values (action_seq.nextval, :action_type, :group_id, :rule_id,:active_p) delete from rules_actions where rule_action_id=:rule_action_id