select interval_id from notification_intervals where name = :name select delivery_method_id from notification_delivery_methods where short_name = :name select name, interval_id, n_seconds from notification_intervals order by n_seconds select name, notification_intervals.interval_id from notification_intervals, notification_types_intervals where notification_intervals.interval_id = notification_types_intervals.interval_id and type_id = :type_id order by n_seconds select pretty_name, notification_delivery_methods.delivery_method_id from notification_delivery_methods, notification_types_del_methods where notification_delivery_methods.delivery_method_id = notification_types_del_methods.delivery_method_id and type_id = :type_id order by pretty_name delete from notification_user_map where notification_id = :notification_id insert into notification_user_map (notification_id, user_id, sent_date) values (:notification_id, :user_id, sysdate)