update ml_mailing_lists
set teaser = :teaser,
confirm_body = :confirm_body,
welcome_body = :welcome_body,
remind_body = :remind_body,
comments = :comments
where list_id = :list_id
update ml_mailing_lists
set teaser = :teaser,
confirm_body = :confirm_body,
welcome_body = :welcome_body,
remind_body = :remind_body,
comments = :comments
where list_id = :list_id
insert into ml_user_email_log (user_id, last_mail_date)
(select :user_id as user_id, null as last_mail_date
from dual
where not exists (select 1 from ml_user_email_log
where user_id = :user_id))
update ml_mailing_list_user_map
set reminder_count = reminder_count + 1
where user_id = :user_id
select 1
from ml_mailing_list_user_map
where list_id = :list_id
and user_id = :user_id
update ml_mail_classes
set text_header = :text_header,
text_body = :text_body,
text_footer = :text_footer,
html_header = :html_header,
html_body = :html_body,
html_footer = :html_footer,
comments = :comments
where mail_class_id = :mail_class_id
update ml_mail_classes
set text_header = :text_header,
text_body = :text_body,
text_footer = :text_footer,
html_header = :html_header,
html_body = :html_body,
html_footer = :html_footer,
comments = :comments
where mail_class_id = :mail_class_id
update ml_mail_jobs
set text_header = :text_header,
text_body = :text_body,
text_footer = :text_footer,
html_header = :html_header,
html_body = :html_body,
html_footer = :html_footer
where mail_job_id = :mail_job_id
select full_sql
from us_selections
where selection_id = :selection_id
update ml_mail_jobs
set sql_query = :full_sql
where mail_job_id = :mail_job_id
update ml_mail_jobs
set text_header = :text_header,
text_body = :text_body,
text_footer = :text_footer,
html_header = :html_header,
html_body = :html_body,
html_footer = :html_footer
where mail_job_id = :mail_job_id