oracle8.1.6 select action_log_id_seq.nextval from dual select action_log_id_seq.nextval from dual declare begin :1 := as_inter_item_check.new ( inter_item_check_id => null, name => :name, action_p => :action_p, section_id_from => :section_id_from, section_id_to => :section_id_to, check_sql => :check_sql, description => :description, postcheck_p => :postcheck_p, item_id => null, assessment_id => :assessment_id, creation_user => :user_id, context_id => null, object_type => 'as_inter_item_check', creation_date => null ); end; declare begin :1 := as_inter_item_check.new ( inter_item_check_id => null, name => :name, action_p => :action_p, section_id_from => :section_id_from, section_id_to => :section_id_to, check_sql => :check_sql, description => :description, postcheck_p => :postcheck_p, item_id => null, assessment_id => :assessment_id, creation_user => :user_id, context_id => null, object_type => 'as_inter_item_check', creation_date => null ); end; begin as_inter_item_check.delete(:check_id); end; select to_date(sysdate,'YYYY-MM-DD') as today, to_date(sysdate-1,'YYYY-MM-DD') as yesterday, to_date (sysdate-2,'YYYY-MM-DD') as two_days,to_date (sysdate-7,'YYYY-MM-DD') as last_week, to_date (sysdate-30,'YYYY-MM-DD') as last_month from dual update as_actions_log set failed_p=:failed_p,date_processed=(select sysdate from dual),finally_executed_by=:user_id,approved_p='t' where action_log_id=:action_log_id insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id,error_txt) values (:log_id,:check_id,:action_id,(select sysdate from dual),(select sysdate from dual),'t',:failed,:user_id,:session_id,:message) insert into as_actions_log (action_log_id,inter_item_check_id,action_id,date_requested,date_processed,approved_p,failed_p,finally_executed_by,session_id,error_txt) values (:log_id,:check_id,:action_id,(select sysdate from dual),null,'f','f',null,:session_id,:message) begin as_inter_item_check.delete(:check_id); end;