The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT IMPORT_LIST_HEADER_ID, PROCESSED_ROWS, NUMBER_OF_FAILED_RECORDS, record_update_flag
from AMS_IMP_LIST_HEADERS_ALL
where IMPORT_TYPE = 'EVENT'
and nvl(PROCESSED_ROWS, -1) < nvl(LOADED_NO_OF_ROWS, 0);
SELECT PROCESSED_ROWS, NUMBER_OF_FAILED_RECORDS, record_update_flag
from AMS_IMP_LIST_HEADERS_ALL
where IMPORT_TYPE = 'EVENT'
and import_list_header_id = p_list_header_id;
select import_source_line_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login,
-- Event Details
event_source_code,
registration_source_type,
attendance_flag,
waitlisted_flag,
cancellation_flag,
cancellation_reason_code,
confirmation_code,
original_system_reference,
--Registrants Details,
reg_party_id,
reg_party_type,
reg_contact_id,
reg_party_name,
reg_title,
reg_first_name,
reg_middle_name,
reg_last_name,
reg_address1,
reg_address2,
reg_address3,
reg_address4,
reg_gender,
reg_address_line_phoenetic,
reg_analysis_fy,
reg_apt_flag,
reg_best_time_contact_begin,
reg_best_time_contact_end,
reg_category_code,
reg_ceo_name,
reg_city,
reg_country,
reg_county,
reg_current_fy_potential_rev,
reg_next_fy_potential_rev,
reg_household_income,
reg_decision_maker_flag,
reg_department,
reg_dun_no_c,
reg_email_address,
reg_employee_total,
reg_fy_end_month,
reg_floor,
reg_gsa_indicator_flag,
reg_house_number,
reg_identifying_address_flag,
reg_jgzz_fiscal_code,
reg_job_title,
reg_last_order_date,
reg_org_legal_status,
reg_line_of_business,
reg_mission_statement,
reg_org_name_phoenetic,
reg_overseas_address_flag,
reg_name_suffix,
reg_phone_area_code,
reg_phone_country_code,
reg_phone_extension,
reg_phone_number,
reg_postal_code,
reg_postal_plus4_code,
reg_po_box_no,
reg_province,
reg_rural_route_no,
reg_rural_route_type,
reg_secondary_suffix_element,
reg_sic_code,
reg_sic_code_type,
reg_site_use_code,
reg_state,
reg_street,
reg_street_number,
reg_street_suffix,
reg_suite,
reg_tax_name,
reg_tax_reference,
reg_timezone,
reg_total_no_of_orders,
reg_total_order_amount,
reg_year_establised,
reg_url,
reg_servey_notes,
reg_contact_me_flag,
reg_email_ok_flag,
-- Attendent Details,
att_party_id,
att_party_type,
att_contact_id,
att_party_name,
att_title,
att_first_name,
att_middle_name,
att_last_name,
att_address1,
att_address2,
att_address3,
att_address4,
att_gender,
att_address_line_phoenetic,
att_analysis_fy,
att_apt_flag,
att_best_time_contact_begin,
att_best_time_contact_end,
att_category_code,
att_ceo_name,
att_city,
att_country,
att_county,
att_current_fy_potential_rev,
att_next_fy_potential_rev,
att_household_income,
att_decision_maker_flag,
att_department,
att_dun_no,
att_email_address,
att_employee_total,
att_fy_end_month,
att_floor,
att_gsa_indicator_flag,
att_house_number,
att_identifying_address_flag,
att_jgzz_fiscal_code,
att_job_title,
att_last_order_date,
att_legal_status,
att_line_of_business,
att_mission_statement,
att_org_name_phoenetic,
att_overseas_address_flag,
att_name_suffix,
att_phone_area_code,
att_phone_country_code,
att_phone_extension,
att_phone_number,
att_postal_code,
att_postal_plus4_code,
att_po_box_no,
att_province,
att_rural_route_no,
att_rural_route_type,
att_secondary_suffix_element,
att_sic_code,
att_sic_code_type,
att_site_use_code,
att_state,
att_street,
att_street_number,
att_street_suffix,
att_suite,
att_tax_name,
att_tax_reference,
att_timezone,
att_total_no_of_orders,
att_total_order_amount,
att_year_establised,
att_url,
att_servey_notes,
att_contact_me_flag,
att_email_ok_flag
from AMS_EVENT_MAPPING_V
where IMPORT_LIST_HEADER_ID = id_in
and IMPORT_SUCCESSFUL_FLAG = 'N'
and load_status in ('ACTIVE', 'RELOAD');
l_reg_rec.LAST_UPDATE_DATE:= l_imp_rec.LAST_UPDATE_DATE;
l_reg_rec.LAST_UPDATED_BY := l_imp_rec.LAST_UPDATED_BY;
l_reg_rec.LAST_UPDATE_LOGIN := l_imp_rec.LAST_UPDATE_LOGIN ;
l_reg_rec.last_update_date := l_imp_rec.last_update_date;
l_reg_rec.last_updated_by := l_imp_rec.last_updated_by;
l_reg_rec.last_update_login := l_imp_rec.last_update_login;
l_reg_rec.update_reg_rec := 'Y';
l_reg_rec.update_reg_rec := 'C';
update_imp_src_line_rec( p_imp_src_id => l_imp_rec.import_source_line_id
, p_imp_hdr_id => l_hdr_id
, p_return_status => l_return_status
, p_msg_data => l_msg_data
, p_msg_count => l_msg_count -- Added by ptendulk on 21-Dec-2002
, p_out_status => l_out_status
);
update_imp_hdr_rec( p_imp_hdr_id => l_hdr_id
, p_processed_rows => l_processed_rows
, p_failed_rows => l_failed_rows
);
l_reg_rec.LAST_UPDATE_DATE:= l_imp_rec.LAST_UPDATE_DATE;
l_reg_rec.LAST_UPDATED_BY := l_imp_rec.LAST_UPDATED_BY;
l_reg_rec.LAST_UPDATE_LOGIN := l_imp_rec.LAST_UPDATE_LOGIN ;
l_reg_rec.last_update_date := l_imp_rec.last_update_date;
l_reg_rec.last_updated_by := l_imp_rec.last_updated_by;
l_reg_rec.last_update_login := l_imp_rec.last_update_login;
l_reg_rec.update_reg_rec := 'Y';
l_reg_rec.update_reg_rec := 'C';
update_imp_src_line_rec( p_imp_src_id => l_imp_rec.import_source_line_id
, p_imp_hdr_id => p_list_header_id
, p_return_status => l_return_status
, p_msg_data => l_msg_data
, p_msg_count => l_msg_count -- Added by ptendulk on 21-Dec-2002
, p_out_status => l_out_status
);
update_imp_hdr_rec( p_imp_hdr_id => p_list_header_id
, p_processed_rows => l_processed_rows
, p_failed_rows => l_failed_rows
);
PROCEDURE update_imp_src_line_rec(p_imp_src_id IN NUMBER
, p_imp_hdr_id IN NUMBER
, p_return_status IN VARCHAR2
, p_msg_data IN VARCHAR2
, p_msg_count IN NUMBER
, p_out_status OUT NOCOPY VARCHAR2 )
IS
l_msg_count NUMBER;
UPDATE ams_imp_source_lines
SET import_successful_flag = 'Y',
load_status = 'SUCCESS' -- This line is added by ptendulk on 13-Jun-02
WHERE import_source_line_id = p_imp_src_id;
UPDATE ams_imp_source_lines
SET import_successful_flag = 'N',
load_status = 'ERROR', -- This line is added by ptendulk on 13-Jun-2002
import_failure_reason = p_msg_data
where import_source_line_id = p_imp_src_id;
PROCEDURE update_imp_hdr_rec(p_imp_hdr_id IN NUMBER
, p_processed_rows IN NUMBER
, p_failed_rows IN NUMBER)
IS
l_return_status VARCHAR2(1);
UPDATE ams_imp_list_headers_all
SET processed_rows = p_processed_rows,
number_of_failed_records = p_failed_rows
WHERE import_list_header_id = p_imp_hdr_id;