postgresql7.2 select nextval('as_actions_log_action_log_id') select nextval('as_actions_log_action_log_id') select as_inter_item_check__delete (:check_id) select to_date(now(),'YYYY-MM-DD') as today, to_date(to_date(now(),'YYYY-MM-DD')-1,'YYYY-MM-DD') as yesterday, to_date (to_date(now(),'YYYY-MM-DD')-2,'YYYY-MM-DD') as two_days,to_date (to_date(now(),'YYYY-MM-DD')-7,'YYYY-MM-DD') as last_week, to_date (to_date(now(),'YYYY-MM-DD')-30,'YYYY-MM-DD') as last_month update as_actions_log set failed_p=:failed_p,date_processed=now(),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,now(),now(),'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,now(),null,'f','f',null,:session_id,:message) select as_inter_item_check__delete (:check_id)