select count(*) from ec_customer_service_actions where action_id=:action_id
select i.user_identification_id as c_user_identification_id, a.interaction_id
from ec_customer_service_actions a, ec_customer_serv_interactions i
where i.interaction_id=a.interaction_id
and a.action_id=:action_id
select u.user_id as issue_user_id, u.user_identification_id as issue_user_identification_id
from ec_user_identification u, ec_customer_service_issues i
where u.user_identification_id = i.user_identification_id
and i.issue_id=:issue_id
select first_names || ' ' || last_name from cc_users where user_id=:issue_user_id
select user_id from ec_user_identification where user_identification_id=:c_user_identification_id
select first_names || ' ' || last_name from cc_users where user_id=:issue_user_id
select user_id as order_user_id from ec_orders where order_id=:order_id
select first_names || ' ' || last_name from cc_users where user_id=:order_user_id
select user_id from ec_user_identification where user_identification_id=:c_user_identification_id
select user_identification_id as uiid_to_insert from ec_user_identification where user_id=:d_user_id
insert into ec_user_identification
(user_identification_id, user_id, email, first_names, last_name, postal_code, other_id_info)
values
(:uiid_to_insert, :user_id_to_insert, :email,:first_names,:last_name,:postal_code,:other_id_info)
insert into ec_customer_serv_interactions
(interaction_id, customer_service_rep, user_identification_id, interaction_date, interaction_originator, interaction_type)
values
(:interaction_id, :customer_service_rep, :uiid_to_insert, $date_string, :interaction_originator, [ec_decode $interaction_type "other" ":interaction_type_other" ":interaction_type"])
insert into ec_cs_issue_type_map
(issue_id, issue_type)
values
(:issue_id, :issue_type)
insert into ec_customer_service_actions
(action_id, issue_id, interaction_id, action_details, follow_up_required)
values
(:action_id, :issue_id, :interaction_id, :action_details,:follow_up_required)
insert into ec_cs_action_info_used_map
(action_id, info_used)
values
(:action_id, :info_used)