call ml_admin.ml_add_lang_table_script( 'v12_3', 'visits', 'download_cursor', 'sql', ' SELECT visits.account_num, visits.number_of_visits, visits.date_of_last_visit, visits.client_num FROM DBA.visits visits WHERE visits.last_modified > @last_download AND ( visits.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE visits.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'visits', 'download_delete_cursor', 'sql', ' SELECT DELETED_visits.account_num, DELETED_visits.client_num FROM DBA.DELETED_visits DELETED_visits, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_visits.deleted_on > @last_download AND DELETED_visits.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'visits', 'upload_delete', 'sql', ' DELETE FROM "DBA"."visits" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'visits', 'upload_insert', 'sql', ' INSERT INTO "DBA"."visits" ( "account_num", "number_of_visits", "date_of_last_visit", "client_num" ) VALUES ( {ml r."account_num"}, {ml r."number_of_visits"}, {ml r."date_of_last_visit"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'visits', 'upload_update', 'sql', ' UPDATE "DBA"."visits" SET "number_of_visits" = {ml r."number_of_visits"}, "date_of_last_visit" = {ml r."date_of_last_visit"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow_history', 'download_cursor', 'sql', ' SELECT escrow_history.account_num, escrow_history.receipt_num, escrow_history.trans_date, escrow_history.trans_time, escrow_history.trans_amt, escrow_history.old_amt, escrow_history.new_amt, escrow_history.client_num FROM DBA.escrow_history escrow_history WHERE escrow_history.last_modified > @last_download AND ( escrow_history.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE escrow_history.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow_history', 'download_delete_cursor', 'sql', ' SELECT DELETED_escrow_history.receipt_num, DELETED_escrow_history.client_num FROM DBA.DELETED_escrow_history DELETED_escrow_history, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_escrow_history.deleted_on > @last_download AND DELETED_escrow_history.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow_history', 'upload_delete', 'sql', ' DELETE FROM "DBA"."escrow_history" WHERE "receipt_num" = {ml r."receipt_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow_history', 'upload_insert', 'sql', ' INSERT INTO "DBA"."escrow_history" ( "account_num", "receipt_num", "trans_date", "trans_time", "trans_amt", "old_amt", "new_amt", "client_num" ) VALUES ( {ml r."account_num"}, {ml r."receipt_num"}, {ml r."trans_date"}, {ml r."trans_time"}, {ml r."trans_amt"}, {ml r."old_amt"}, {ml r."new_amt"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow_history', 'upload_update', 'sql', ' UPDATE "DBA"."escrow_history" SET "account_num" = {ml r."account_num"}, "trans_date" = {ml r."trans_date"}, "trans_time" = {ml r."trans_time"}, "trans_amt" = {ml r."trans_amt"}, "old_amt" = {ml r."old_amt"}, "new_amt" = {ml r."new_amt"} WHERE "receipt_num" = {ml r."receipt_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory_tracking', 'download_cursor', 'sql', ' SELECT inventory_tracking.plu_num, inventory_tracking.date_stocked, inventory_tracking.time_stocked, inventory_tracking.employee_num, inventory_tracking.previous_qty, inventory_tracking.restock_qty, inventory_tracking.client_num, inventory_tracking.old_cost, inventory_tracking.new_cost, inventory_tracking.old_sale_price, inventory_tracking.new_sale_price FROM DBA.inventory_tracking inventory_tracking WHERE inventory_tracking.last_modified > @last_download AND ( inventory_tracking.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients WHERE inventory_tracking.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory_tracking', 'download_delete_cursor', 'sql', ' SELECT DELETED_inventory_tracking.plu_num, DELETED_inventory_tracking.date_stocked, DELETED_inventory_tracking.time_stocked, DELETED_inventory_tracking.client_num FROM DBA.DELETED_inventory_tracking DELETED_inventory_tracking, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_inventory_tracking.deleted_on > @last_download AND DELETED_inventory_tracking.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory_tracking', 'upload_delete', 'sql', ' DELETE FROM "DBA"."inventory_tracking" WHERE "plu_num" = {ml r."plu_num"} AND "date_stocked" = {ml r."date_stocked"} AND "time_stocked" = {ml r."time_stocked"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory_tracking', 'upload_insert', 'sql', ' INSERT INTO "DBA"."inventory_tracking" ( "plu_num", "date_stocked", "time_stocked", "employee_num", "previous_qty", "restock_qty", "client_num", "old_cost", "new_cost", "old_sale_price", "new_sale_price" ) VALUES ( {ml r."plu_num"}, {ml r."date_stocked"}, {ml r."time_stocked"}, {ml r."employee_num"}, {ml r."previous_qty"}, {ml r."restock_qty"}, {ml r."client_num"}, {ml r."old_cost"}, {ml r."new_cost"}, {ml r."old_sale_price"}, {ml r."new_sale_price"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory_tracking', 'upload_update', 'sql', ' UPDATE "DBA"."inventory_tracking" SET "employee_num" = {ml r."employee_num"}, "previous_qty" = {ml r."previous_qty"}, "restock_qty" = {ml r."restock_qty"}, "old_cost" = {ml r."old_cost"}, "new_cost" = {ml r."new_cost"}, "old_sale_price" = {ml r."old_sale_price"}, "new_sale_price" = {ml r."new_sale_price"} WHERE "plu_num" = {ml r."plu_num"} AND "date_stocked" = {ml r."date_stocked"} AND "time_stocked" = {ml r."time_stocked"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'EBCS_Version', 'download_cursor', 'sql', ' SELECT EBCS_Version.client_num, EBCS_Version.version FROM DBA.EBCS_Version EBCS_Version WHERE EBCS_Version.last_modified > @last_download AND ( EBCS_Version.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE EBCS_Version.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'EBCS_Version', 'download_delete_cursor', 'sql', ' SELECT DELETED_ebcs_version.client_num FROM DBA.DELETED_ebcs_version DELETED_ebcs_version, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs_version.deleted_on > @last_download AND DELETED_ebcs_version.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'EBCS_Version', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."EBCS_Version" WHERE "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'EBCS_Version', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."EBCS_Version" ( "client_num", "version" ) VALUES ( {ml r."client_num"}, {ml r."version"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'EBCS_Version', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."EBCS_Version" SET "version" = {ml r."version"} WHERE "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_contract_versions', 'download_cursor', 'sql', ' SELECT ebcs_contract_versions.account_num, ebcs_contract_versions.client_num, ebcs_contract_versions.mod_number, ebcs_contract_versions.contract_date, ebcs_contract_versions.contract_blob, ebcs_contract_versions.ebcs_code, ebcs_contract_versions.salesperson_id FROM DBA.ebcs_contract_versions ebcs_contract_versions WHERE ebcs_contract_versions.last_modified > @last_download AND @last_download <> ''1900-01-01'' AND ( ebcs_contract_versions.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE ebcs_contract_versions.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_contract_versions', 'download_delete_cursor', 'sql', ' SELECT DELETED_ebcs_contract_versions.account_num, DELETED_ebcs_contract_versions.client_num, DELETED_ebcs_contract_versions.mod_number FROM DBA.DELETED_ebcs_contract_versions DELETED_ebcs_contract_versions, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs_contract_versions.deleted_on > @last_download AND DELETED_ebcs_contract_versions.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_contract_versions', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."ebcs_contract_versions" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} AND "mod_number" = {ml r."mod_number"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_contract_versions', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."ebcs_contract_versions" ( "account_num", "client_num", "mod_number", "contract_date", "contract_blob", "ebcs_code", "salesperson_id" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."mod_number"}, {ml r."contract_date"}, {ml r."contract_blob"}, {ml r."ebcs_code"}, {ml r."salesperson_id"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_contract_versions', 'upload_update', 'sql', ' UPDATE "DBA"."ebcs_contract_versions" SET "contract_date" = {ml r."contract_date"}, "contract_blob" = {ml r."contract_blob"}, "ebcs_code" = {ml r."ebcs_code"}, "salesperson_id" = {ml r."salesperson_id"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} AND "mod_number" = {ml r."mod_number"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_pic', 'download_cursor', 'sql', ' SELECT ebcs_pic.account_num, ebcs_pic.client_num, ebcs_pic.member_pic FROM DBA.ebcs_pic ebcs_pic WHERE ebcs_pic.last_modified > @last_download AND ( ebcs_pic.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE ebcs_pic.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_pic', 'download_delete_cursor', 'sql', ' SELECT DELETED_ebcs_pic.account_num, DELETED_ebcs_pic.client_num FROM DBA.DELETED_ebcs_pic DELETED_ebcs_pic, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs_pic.deleted_on > @last_download AND DELETED_ebcs_pic.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_pic', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."ebcs_pic" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_pic', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."ebcs_pic" ( "account_num", "client_num", "member_pic" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."member_pic"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_pic', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."ebcs_pic" SET "member_pic" = {ml r."member_pic"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'aba_info', 'download_cursor', 'sql', ' SELECT aba_info.bank_name, aba_info.routing_num, aba_info.notes, aba_info.client_num FROM DBA.aba_info aba_info WHERE aba_info.last_modified > @last_download AND ( aba_info.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE aba_info.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'aba_info', 'download_delete_cursor', 'sql', ' SELECT DELETED_aba_info.bank_name, DELETED_aba_info.routing_num, DELETED_aba_info.client_num FROM DBA.DELETED_aba_info DELETED_aba_info, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_aba_info.deleted_on > @last_download AND DELETED_aba_info.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'aba_info', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."aba_info" WHERE "bank_name" = {ml r."bank_name"} AND "routing_num" = {ml r."routing_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'aba_info', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."aba_info" ( "bank_name", "routing_num", "notes", "client_num" ) VALUES ( {ml r."bank_name"}, {ml r."routing_num"}, {ml r."notes"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'aba_info', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."aba_info" SET "notes" = {ml r."notes"} WHERE "bank_name" = {ml r."bank_name"} AND "routing_num" = {ml r."routing_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'service_xlat', 'download_cursor', 'sql', ' SELECT service_xlat.service_1, service_xlat.service_2, service_xlat.service_3, service_xlat.service_4, service_xlat.service_5, service_xlat.service_6, service_xlat.service_7, service_xlat.service_8, service_xlat.service_9, service_xlat.service_10, service_xlat.client_num FROM DBA.service_xlat service_xlat WHERE service_xlat.last_modified > @last_download AND ( service_xlat.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE service_xlat.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'service_xlat', 'download_delete_cursor', 'sql', ' SELECT DELETED_service_xlat.client_num FROM DBA.DELETED_service_xlat DELETED_service_xlat, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_service_xlat.deleted_on > @last_download AND DELETED_service_xlat.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'service_xlat', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."service_xlat" WHERE "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'service_xlat', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."service_xlat" ( "service_1", "service_2", "service_3", "service_4", "service_5", "service_6", "service_7", "service_8", "service_9", "service_10", "client_num" ) VALUES ( {ml r."service_1"}, {ml r."service_2"}, {ml r."service_3"}, {ml r."service_4"}, {ml r."service_5"}, {ml r."service_6"}, {ml r."service_7"}, {ml r."service_8"}, {ml r."service_9"}, {ml r."service_10"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'service_xlat', 'upload_update', 'sql', ' U/* Update the row in the consolidated database. */ UPDATE "DBA"."service_xlat" SET "service_1" = {ml r."service_1"}, "service_2" = {ml r."service_2"}, "service_3" = {ml r."service_3"}, "service_4" = {ml r."service_4"}, "service_5" = {ml r."service_5"}, "service_6" = {ml r."service_6"}, "service_7" = {ml r."service_7"}, "service_8" = {ml r."service_8"}, "service_9" = {ml r."service_9"}, "service_10" = {ml r."service_10"} WHERE "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'contract_type', 'download_cursor', 'sql', ' SELECT contract_type.contract_type_name, contract_type.contract_type_code, contract_type.contract_type_description, contract_type.all_days_hours_yn, contract_type.monday_yn, contract_type.tuesday_yn, contract_type.wednesday_yn, contract_type.thursday_yn, contract_type.friday_yn, contract_type.saturday_yn, contract_type.sunday_yn, contract_type.monday_start_time, contract_type.monday_end_time, contract_type.tuesday_start_time, contract_type.tuesday_end_time, contract_type.wednesday_start_time, contract_type.wednesday_end_time, contract_type.thursday_start_time, contract_type.thursday_end_time, contract_type.friday_start_time, contract_type.friday_end_time, contract_type.saturday_start_time, contract_type.saturday_end_time, contract_type.sunday_start_time, contract_type.sunday_end_time, contract_type.cash_price, contract_type.initiation_fee, contract_type.payment_amt, contract_type.service1_yn, contract_type.service2_yn, contract_type.service3_yn, contract_type.service4_yn, contract_type.service5_yn, contract_type.service6_yn, contract_type.service7_yn, contract_type.service8_yn, contract_type.service9_yn, contract_type.service10_yn, contract_type.contract_template, contract_type.inactive_yn, contract_type.auto_renewal, contract_type.contract_edit_yn, contract_type.cash_price_edit_yn, contract_type.max_num_services, contract_type.contract_term, contract_type.sales_tax, contract_type.contract_type, contract_type.client_num, contract_type.prorate_dues, contract_type.prorate_maint_fee, contract_type.maint_fee, contract_type.maint_cycle, contract_type.maint_month, contract_type.maint_day, contract_type.preenroll_yn, contract_type.reciprocity_yn FROM DBA.contract_type contract_type WHERE contract_type.last_modified > @last_download AND ( contract_type.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE contract_type.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'contract_type', 'download_delete_cursor', 'sql', ' SELECT DELETED_contract_type.contract_type_name, DELETED_contract_type.contract_type_code, DELETED_contract_type.client_num FROM DBA.DELETED_contract_type DELETED_contract_type, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_contract_type.deleted_on > @last_download AND DELETED_contract_type.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'contract_type', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."contract_type" WHERE "contract_type_name" = {ml r."contract_type_name"} AND "contract_type_code" = {ml r."contract_type_code"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'contract_type', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."contract_type" ( "contract_type_name", "contract_type_code", "contract_type_description", "all_days_hours_yn", "monday_yn", "tuesday_yn", "wednesday_yn", "thursday_yn", "friday_yn", "saturday_yn", "sunday_yn", "monday_start_time", "monday_end_time", "tuesday_start_time", "tuesday_end_time", "wednesday_start_time", "wednesday_end_time", "thursday_start_time", "thursday_end_time", "friday_start_time", "friday_end_time", "saturday_start_time", "saturday_end_time", "sunday_start_time", "sunday_end_time", "cash_price", "initiation_fee", "payment_amt", "service1_yn", "service2_yn", "service3_yn", "service4_yn", "service5_yn", "service6_yn", "service7_yn", "service8_yn", "service9_yn", "service10_yn", "contract_template", "inactive_yn", "auto_renewal", "contract_edit_yn", "cash_price_edit_yn", "max_num_services", "contract_term", "sales_tax", "contract_type", "client_num", "prorate_dues", "prorate_maint_fee", "maint_fee", "maint_cycle", "maint_month", "maint_day", "preenroll_yn", "reciprocity_yn" ) VALUES ( {ml r."contract_type_name"}, {ml r."contract_type_code"}, {ml r."contract_type_description"}, {ml r."all_days_hours_yn"}, {ml r."monday_yn"}, {ml r."tuesday_yn"}, {ml r."wednesday_yn"}, {ml r."thursday_yn"}, {ml r."friday_yn"}, {ml r."saturday_yn"}, {ml r."sunday_yn"}, {ml r."monday_start_time"}, {ml r."monday_end_time"}, {ml r."tuesday_start_time"}, {ml r."tuesday_end_time"}, {ml r."wednesday_start_time"}, {ml r."wednesday_end_time"}, {ml r."thursday_start_time"}, {ml r."thursday_end_time"}, {ml r."friday_start_time"}, {ml r."friday_end_time"}, {ml r."saturday_start_time"}, {ml r."saturday_end_time"}, {ml r."sunday_start_time"}, {ml r."sunday_end_time"}, {ml r."cash_price"}, {ml r."initiation_fee"}, {ml r."payment_amt"}, {ml r."service1_yn"}, {ml r."service2_yn"}, {ml r."service3_yn"}, {ml r."service4_yn"}, {ml r."service5_yn"}, {ml r."service6_yn"}, {ml r."service7_yn"}, {ml r."service8_yn"}, {ml r."service9_yn"}, {ml r."service10_yn"}, {ml r."contract_template"}, {ml r."inactive_yn"}, {ml r."auto_renewal"}, {ml r."contract_edit_yn"}, {ml r."cash_price_edit_yn"}, {ml r."max_num_services"}, {ml r."contract_term"}, {ml r."sales_tax"}, {ml r."contract_type"}, {ml r."client_num"}, {ml r."prorate_dues"}, {ml r."prorate_maint_fee"}, {ml r."maint_fee"}, {ml r."maint_cycle"}, {ml r."maint_month"}, {ml r."maint_day"}, {ml r."preenroll_yn"}, {ml r."reciprocity_yn"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'contract_type', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."contract_type" SET "contract_type_description" = {ml r."contract_type_description"}, "all_days_hours_yn" = {ml r."all_days_hours_yn"}, "monday_yn" = {ml r."monday_yn"}, "tuesday_yn" = {ml r."tuesday_yn"}, "wednesday_yn" = {ml r."wednesday_yn"}, "thursday_yn" = {ml r."thursday_yn"}, "friday_yn" = {ml r."friday_yn"}, "saturday_yn" = {ml r."saturday_yn"}, "sunday_yn" = {ml r."sunday_yn"}, "monday_start_time" = {ml r."monday_start_time"}, "monday_end_time" = {ml r."monday_end_time"}, "tuesday_start_time" = {ml r."tuesday_start_time"}, "tuesday_end_time" = {ml r."tuesday_end_time"}, "wednesday_start_time" = {ml r."wednesday_start_time"}, "wednesday_end_time" = {ml r."wednesday_end_time"}, "thursday_start_time" = {ml r."thursday_start_time"}, "thursday_end_time" = {ml r."thursday_end_time"}, "friday_start_time" = {ml r."friday_start_time"}, "friday_end_time" = {ml r."friday_end_time"}, "saturday_start_time" = {ml r."saturday_start_time"}, "saturday_end_time" = {ml r."saturday_end_time"}, "sunday_start_time" = {ml r."sunday_start_time"}, "sunday_end_time" = {ml r."sunday_end_time"}, "cash_price" = {ml r."cash_price"}, "initiation_fee" = {ml r."initiation_fee"}, "payment_amt" = {ml r."payment_amt"}, "service1_yn" = {ml r."service1_yn"}, "service2_yn" = {ml r."service2_yn"}, "service3_yn" = {ml r."service3_yn"}, "service4_yn" = {ml r."service4_yn"}, "service5_yn" = {ml r."service5_yn"}, "service6_yn" = {ml r."service6_yn"}, "service7_yn" = {ml r."service7_yn"}, "service8_yn" = {ml r."service8_yn"}, "service9_yn" = {ml r."service9_yn"}, "service10_yn" = {ml r."service10_yn"}, "contract_template" = {ml r."contract_template"}, "inactive_yn" = {ml r."inactive_yn"}, "auto_renewal" = {ml r."auto_renewal"}, "contract_edit_yn" = {ml r."contract_edit_yn"}, "cash_price_edit_yn" = {ml r."cash_price_edit_yn"}, "max_num_services" = {ml r."max_num_services"}, "contract_term" = {ml r."contract_term"}, "sales_tax" = {ml r."sales_tax"}, "contract_type" = {ml r."contract_type"}, "prorate_dues" = {ml r."prorate_dues"}, "prorate_maint_fee" = {ml r."prorate_maint_fee"}, "maint_fee" = {ml r."maint_fee"}, "maint_cycle" = {ml r."maint_cycle"}, "maint_month" = {ml r."maint_month"}, "maint_day" = {ml r."maint_day"}, "preenroll_yn" = {ml r."preenroll_yn"}, "reciprocity_yn" = {ml r."reciprocity_yn"} WHERE "contract_type_name" = {ml r."contract_type_name"} AND "contract_type_code" = {ml r."contract_type_code"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cc_transaction', 'download_cursor', 'sql', ' SELECT cc_transaction.recipt_num, cc_transaction.sequence_num, cc_transaction.ticket, cc_transaction.tran_date, cc_transaction.tran_time, cc_transaction.card_num, cc_transaction.issuer, cc_transaction.member_name, cc_transaction.action, cc_transaction.manual, cc_transaction.tran_amount, cc_transaction.int_reference, cc_transaction.result_ref, cc_transaction.result, cc_transaction.auth, cc_transaction.result_auth, cc_transaction.street, cc_transaction.zip, cc_transaction.processor, cc_transaction.merch_num, cc_transaction.expdate, cc_transaction.cvv2_resp, cc_transaction.cc_user, cc_transaction.troutd, cc_transaction.client_num FROM DBA.cc_transaction cc_transaction WHERE cc_transaction.last_modified > @last_download AND ( cc_transaction.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE cc_transaction.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cc_transaction', 'download_delete_cursor', 'sql', ' SELECT DELETED_cc_transaction.recipt_num, DELETED_cc_transaction.sequence_num, DELETED_cc_transaction.client_num FROM DBA.DELETED_cc_transaction DELETED_cc_transaction, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_cc_transaction.deleted_on > @last_download AND DELETED_cc_transaction.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cc_transaction', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."cc_transaction" WHERE "recipt_num" = {ml r."recipt_num"} AND "sequence_num" = {ml r."sequence_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cc_transaction', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."cc_transaction" ( "recipt_num", "sequence_num", "ticket", "tran_date", "tran_time", "card_num", "issuer", "member_name", "action", "manual", "tran_amount", "int_reference", "result_ref", "result", "auth", "result_auth", "street", "zip", "processor", "merch_num", "expdate", "cvv2_resp", "cc_user", "troutd", "client_num" ) VALUES ( {ml r."recipt_num"}, {ml r."sequence_num"}, {ml r."ticket"}, {ml r."tran_date"}, {ml r."tran_time"}, {ml r."card_num"}, {ml r."issuer"}, {ml r."member_name"}, {ml r."action"}, {ml r."manual"}, {ml r."tran_amount"}, {ml r."int_reference"}, {ml r."result_ref"}, {ml r."result"}, {ml r."auth"}, {ml r."result_auth"}, {ml r."street"}, {ml r."zip"}, {ml r."processor"}, {ml r."merch_num"}, {ml r."expdate"}, {ml r."cvv2_resp"}, {ml r."cc_user"}, {ml r."troutd"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cc_transaction', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."cc_transaction" SET "ticket" = {ml r."ticket"}, "tran_date" = {ml r."tran_date"}, "tran_time" = {ml r."tran_time"}, "card_num" = {ml r."card_num"}, "issuer" = {ml r."issuer"}, "member_name" = {ml r."member_name"}, "action" = {ml r."action"}, "manual" = {ml r."manual"}, "tran_amount" = {ml r."tran_amount"}, "int_reference" = {ml r."int_reference"}, "result_ref" = {ml r."result_ref"}, "result" = {ml r."result"}, "auth" = {ml r."auth"}, "result_auth" = {ml r."result_auth"}, "street" = {ml r."street"}, "zip" = {ml r."zip"}, "processor" = {ml r."processor"}, "merch_num" = {ml r."merch_num"}, "expdate" = {ml r."expdate"}, "cvv2_resp" = {ml r."cvv2_resp"}, "cc_user" = {ml r."cc_user"}, "troutd" = {ml r."troutd"} WHERE "recipt_num" = {ml r."recipt_num"} AND "sequence_num" = {ml r."sequence_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'vendor', 'download_cursor', 'sql', ' SELECT vendor.vendor_code, vendor.vendor_company, vendor.phone_1, vendor.phone_2, vendor.account_num, vendor.last_name, vendor.first_name, vendor.street, vendor.city, vendor.state, vendor.zip, vendor.email, vendor.active, vendor.client_num FROM DBA.vendor vendor WHERE vendor.last_modified > @last_download AND ( vendor.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE vendor.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'vendor', 'download_delete_cursor', 'sql', ' SELECT DELETED_vendor.vendor_code, DELETED_vendor.client_num FROM DBA.DELETED_vendor DELETED_vendor, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_vendor.deleted_on > @last_download AND DELETED_vendor.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'vendor', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."vendor" WHERE "vendor_code" = {ml r."vendor_code"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'vendor', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."vendor" ( "vendor_code", "vendor_company", "phone_1", "phone_2", "account_num", "last_name", "first_name", "street", "city", "state", "zip", "email", "active", "client_num" ) VALUES ( {ml r."vendor_code"}, {ml r."vendor_company"}, {ml r."phone_1"}, {ml r."phone_2"}, {ml r."account_num"}, {ml r."last_name"}, {ml r."first_name"}, {ml r."street"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."email"}, {ml r."active"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'vendor', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."vendor" SET "vendor_company" = {ml r."vendor_company"}, "phone_1" = {ml r."phone_1"}, "phone_2" = {ml r."phone_2"}, "account_num" = {ml r."account_num"}, "last_name" = {ml r."last_name"}, "first_name" = {ml r."first_name"}, "street" = {ml r."street"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "email" = {ml r."email"}, "active" = {ml r."active"} WHERE "vendor_code" = {ml r."vendor_code"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'last_receipt_num', 'download_cursor', 'sql', 'SELECT last_receipt_num.receipt_num, last_receipt_num.client_num, last_receipt_num.id_num FROM DBA.last_receipt_num last_receipt_num WHERE last_receipt_num.last_modified > @last_download AND ( last_receipt_num.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE last_receipt_num.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'last_receipt_num', 'download_delete_cursor', 'sql', ' SELECT DELETED_last_receipt_num.client_num, DELETED_last_receipt_num.id_num FROM DBA.DELETED_last_receipt_num DELETED_last_receipt_num, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_last_receipt_num.deleted_on > @last_download AND DELETED_last_receipt_num.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'last_receipt_num', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."last_receipt_num" WHERE "client_num" = {ml r."client_num"} AND "id_num" = {ml r."id_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'last_receipt_num', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."last_receipt_num" ( "receipt_num", "client_num", "id_num" ) VALUES ( {ml r."receipt_num"}, {ml r."client_num"}, {ml r."id_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'last_receipt_num', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."last_receipt_num" SET "receipt_num" = {ml r."receipt_num"} WHERE "client_num" = {ml r."client_num"} AND "id_num" = {ml r."id_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card_history', 'download_cursor', 'sql', ' SELECT gift_card_history.giftcard_id, gift_card_history.recipt_num, gift_card_history.trans_date, gift_card_history.trans_time, gift_card_history.trans_amt, gift_card_history.trans_type, gift_card_history.client_num FROM DBA.gift_card_history gift_card_history WHERE gift_card_history.last_modified > @last_download AND ( gift_card_history.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE gift_card_history.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card_history', 'download_delete_cursor', 'sql', ' SELECT DELETED_gift_card_history.giftcard_id, DELETED_gift_card_history.recipt_num, DELETED_gift_card_history.client_num FROM DBA.DELETED_gift_card_history DELETED_gift_card_history, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_gift_card_history.deleted_on > @last_download AND DELETED_gift_card_history.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card_history', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."gift_card_history" WHERE "giftcard_id" = {ml r."giftcard_id"} AND "recipt_num" = {ml r."recipt_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card_history', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."gift_card_history" ( "giftcard_id", "recipt_num", "trans_date", "trans_time", "trans_amt", "trans_type", "client_num" ) VALUES ( {ml r."giftcard_id"}, {ml r."recipt_num"}, {ml r."trans_date"}, {ml r."trans_time"}, {ml r."trans_amt"}, {ml r."trans_type"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card_history', 'upload_update', 'sql', ' UPDATE "DBA"."gift_card_history" SET "trans_date" = {ml r."trans_date"}, "trans_time" = {ml r."trans_time"}, "trans_amt" = {ml r."trans_amt"}, "trans_type" = {ml r."trans_type"} WHERE "giftcard_id" = {ml r."giftcard_id"} AND "recipt_num" = {ml r."recipt_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card', 'download_cursor', 'sql', ' SELECT gift_card.giftcard_id, gift_card.giftcard_bal, gift_card.last_trans_dt, gift_card.last_trans_tm, gift_card.last_trans_amt, gift_card.client_num FROM DBA.gift_card gift_card WHERE gift_card.last_modified > @last_download AND ( gift_card.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE gift_card.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card', 'download_delete_cursor', 'sql', ' SELECT DELETED_gift_card.giftcard_id, DELETED_gift_card.client_num FROM DBA.DELETED_gift_card DELETED_gift_card, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_gift_card.deleted_on > @last_download AND DELETED_gift_card.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."gift_card" WHERE "giftcard_id" = {ml r."giftcard_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."gift_card" ( "giftcard_id", "giftcard_bal", "last_trans_dt", "last_trans_tm", "last_trans_amt", "client_num" ) VALUES ( {ml r."giftcard_id"}, {ml r."giftcard_bal"}, {ml r."last_trans_dt"}, {ml r."last_trans_tm"}, {ml r."last_trans_amt"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'gift_card', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."gift_card" SET "giftcard_bal" = {ml r."giftcard_bal"}, "last_trans_dt" = {ml r."last_trans_dt"}, "last_trans_tm" = {ml r."last_trans_tm"}, "last_trans_amt" = {ml r."last_trans_amt"} WHERE "giftcard_id" = {ml r."giftcard_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_detail', 'download_cursor', 'sql', ' SELECT reg_master_detail.recipt_num, reg_master_detail.plu_num, reg_master_detail.description, reg_master_detail.qty, reg_master_detail.unit_price, reg_master_detail.total_price, reg_master_detail.item_num, reg_master_detail.register_num, reg_master_detail.tax, reg_master_detail.tax_total, reg_master_detail.tax_code, reg_master_detail.catagory, reg_master_detail.department, reg_master_detail.client_num FROM DBA.reg_master_detail WHERE reg_master_detail.last_modified > @last_download AND ( reg_master_detail.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE reg_master_detail.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_detail', 'download_delete_cursor', 'sql', ' SELECT DELETED_reg_master_detail.recipt_num, DELETED_reg_master_detail.item_num, DELETED_reg_master_detail.register_num, DELETED_reg_master_detail.client_num FROM DBA.DELETED_reg_master_detail DELETED_reg_master_detail, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_reg_master_detail.deleted_on > @last_download AND DELETED_reg_master_detail.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_detail', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."reg_master_detail" WHERE "recipt_num" = {ml r."recipt_num"} AND "item_num" = {ml r."item_num"} AND "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_detail', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."reg_master_detail" ( "recipt_num", "plu_num", "description", "qty", "unit_price", "total_price", "item_num", "register_num", "tax", "tax_total", "tax_code", "catagory", "department", "client_num" ) VALUES ( {ml r."recipt_num"}, {ml r."plu_num"}, {ml r."description"}, {ml r."qty"}, {ml r."unit_price"}, {ml r."total_price"}, {ml r."item_num"}, {ml r."register_num"}, {ml r."tax"}, {ml r."tax_total"}, {ml r."tax_code"}, {ml r."catagory"}, {ml r."department"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_detail', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."reg_master_detail" SET "plu_num" = {ml r."plu_num"}, "description" = {ml r."description"}, "qty" = {ml r."qty"}, "unit_price" = {ml r."unit_price"}, "total_price" = {ml r."total_price"}, "tax" = {ml r."tax"}, "tax_total" = {ml r."tax_total"}, "tax_code" = {ml r."tax_code"}, "catagory" = {ml r."catagory"}, "department" = {ml r."department"} WHERE "recipt_num" = {ml r."recipt_num"} AND "item_num" = {ml r."item_num"} AND "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'member_file', 'download_cursor', 'sql', ' SELECT member_file.id_num, member_file.account_num, member_file.account_status, member_file.card_num, member_file.joint_accont_num, member_file.first_name, member_file.last_name, member_file.mi, member_file.generation, member_file.street_num, member_file.street_name, member_file.second_line_address, member_file.city, member_file.state, member_file.zip, member_file.home_phone, member_file.work_phone, member_file.work_ext, member_file.emp_name, member_file.ssn, member_file.dob, member_file.month_of_dob, member_file.sex, member_file.source_code, member_file.contract_date, member_file.contract_expir_date, member_file.name_of_contract, member_file.term_of_contract, member_file.cash_price_of_contract, member_file.total_of_sale, member_file.down_payment, member_file.number_of_payments, member_file.amount_of_payment, member_file.remaining_num_of_payments, member_file.total_of_all_payments, member_file.first_payment_due_date, member_file.next_payment_due_date, member_file.method_of_payment, member_file.remaining_bal_on_contract, member_file.current_paymts_due, member_file.deliq_1to10_day_due, member_file.deliq_11_to30_days_due, member_file.deliq_30to60_days_due, member_file.deliq_61to90_days_due, member_file.deliq_90to120_days_due, member_file.over_120_days, member_file.total_paymt_due, member_file.late_fees_owed, member_file.return_fees_owed, member_file.service_fees_owed, member_file.total_amt_due_now, member_file.payoff_amt, member_file.method_of_last_paymt_recd, member_file.total_amt_of_last_payment, member_file.date_of_last_paymt, member_file.amt_applied_to_paymts, member_file.amt_applied_to_late_fees, member_file.amt_applied_to_return_fees, member_file.amt_applied_to_service_fees, member_file.days_deliq_when_recieved, member_file.num_of_days_late, member_file.billing_cycle, member_file.renewal_date, member_file.renewal_amt, member_file.renewal_term, member_file.mail_invoice, member_file.member_since, member_file.original_contrat_date, member_file.total_money_paid_to_date, member_file.date_account_entered, member_file.notes_line_one, member_file.notes_line_two, member_file.description, member_file.credit, member_file.court_num, member_file.court_date, member_file.court_time, member_file.taxable, member_file.date_of_last_visit, member_file.client_num, member_file.number_of_visits, member_file.misc_field, member_file.cancel_acc_after_date, member_file.id_picture, member_file.number_of_pb_mailed, member_file.date_of_last_pb, member_file.email_address, member_file.with_another_agency, member_file.height, member_file.weight, member_file.eye_color, member_file.hair_color, member_file.bad_address, member_file.bad_home_num, member_file.bad_work_num, member_file.purge_from_sys, member_file.interest_saved, member_file.total_payoff_amt, member_file.monthly_draft_amt, member_file.date_of_return, member_file.reason_returned, member_file.amount_of_return, member_file.due_date_of_return, member_file.fist_sale_person, member_file.sec_sale_person, member_file.date_1st_renewal_mailed, member_file.date_2nd_renewal_mailed, member_file.date_of_collection_letter, member_file.date_sent_to_trw, member_file.num_of_lat_notices_maild, member_file.date_of_last_late_notice, member_file.rewrite_date, member_file.finance_percentage, member_file.amount_of_finance_charge, member_file.financed_amount, member_file.num_of_times_charged, member_file.num_of_times_to_charge, member_file.special_charg_discript, member_file.first_date_to_charge, member_file.next_date_to_charge, member_file.amt_of_special_chrg, member_file.total_princ_plus_fin_due, member_file.club_database, member_file.credit_date, member_file.bank_name, member_file.bank_address, member_file.bank_city, member_file.bank_state, member_file.bank_zip, member_file.routing_num, member_file.bank_acc_num, member_file.credit_card_exprtion_date, member_file.credit_card_name, member_file.credit_card_num, member_file.credit_card_tye, member_file.old_credit_card_num, member_file.monthly_cc_draft, member_file.mi_on_bank_acct, member_file.mi_on_credit_card, member_file.last_name_on_back_acct, member_file.last_name_on_credit_card, member_file.first_name_on_bank_acct, member_file.first_name_on_credit_card, member_file.pct_day1, member_file.pct_day2, member_file.pct_day3, member_file.pct_day4, member_file.pct_time1_in, member_file.pct_time1_out, member_file.pct_time2_in, member_file.pct_time2_out, member_file.pct_time3_in, member_file.pct_time3_out, member_file.pct_time4_in, member_file.pct_time4_out, member_file.pct_court1_num, member_file.pct_court2_num, member_file.pct_court3_num, member_file.pct_court4_num, member_file.cell_phone FROM DBA.member_file member_file WHERE member_file.last_modified > @last_download AND ( member_file.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE member_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'member_file', 'download_delete_cursor', 'sql', ' SELECT DELETED_member_file.id_num, DELETED_member_file.client_num FROM DBA.DELETED_member_file DELETED_member_file, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_member_file.deleted_on > @last_download AND DELETED_member_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'member_file', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."member_file" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'member_file', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."member_file" ( "id_num", "account_num", "account_status", "card_num", "joint_accont_num", "first_name", "last_name", "mi", "generation", "street_num", "street_name", "second_line_address", "city", "state", "zip", "home_phone", "work_phone", "work_ext", "emp_name", "ssn", "dob", "month_of_dob", "sex", "source_code", "contract_date", "contract_expir_date", "name_of_contract", "term_of_contract", "cash_price_of_contract", "total_of_sale", "down_payment", "number_of_payments", "amount_of_payment", "remaining_num_of_payments", "total_of_all_payments", "first_payment_due_date", "next_payment_due_date", "method_of_payment", "remaining_bal_on_contract", "current_paymts_due", "deliq_1to10_day_due", "deliq_11_to30_days_due", "deliq_30to60_days_due", "deliq_61to90_days_due", "deliq_90to120_days_due", "over_120_days", "total_paymt_due", "late_fees_owed", "return_fees_owed", "service_fees_owed", "total_amt_due_now", "payoff_amt", "method_of_last_paymt_recd", "total_amt_of_last_payment", "date_of_last_paymt", "amt_applied_to_paymts", "amt_applied_to_late_fees", "amt_applied_to_return_fees", "amt_applied_to_service_fees", "days_deliq_when_recieved", "num_of_days_late", "billing_cycle", "renewal_date", "renewal_amt", "renewal_term", "mail_invoice", "member_since", "original_contrat_date", "total_money_paid_to_date", "date_account_entered", "notes_line_one", "notes_line_two", "description", "credit", "court_num", "court_date", "court_time", "taxable", "date_of_last_visit", "client_num", "number_of_visits", "misc_field", "cancel_acc_after_date", "id_picture", "number_of_pb_mailed", "date_of_last_pb", "email_address", "with_another_agency", "height", "weight", "eye_color", "hair_color", "bad_address", "bad_home_num", "bad_work_num", "purge_from_sys", "interest_saved", "total_payoff_amt", "monthly_draft_amt", "date_of_return", "reason_returned", "amount_of_return", "due_date_of_return", "fist_sale_person", "sec_sale_person", "date_1st_renewal_mailed", "date_2nd_renewal_mailed", "date_of_collection_letter", "date_sent_to_trw", "num_of_lat_notices_maild", "date_of_last_late_notice", "rewrite_date", "finance_percentage", "amount_of_finance_charge", "financed_amount", "num_of_times_charged", "num_of_times_to_charge", "special_charg_discript", "first_date_to_charge", "next_date_to_charge", "amt_of_special_chrg", "total_princ_plus_fin_due", "club_database", "credit_date", "bank_name", "bank_address", "bank_city", "bank_state", "bank_zip", "routing_num", "bank_acc_num", "credit_card_exprtion_date", "credit_card_name", "credit_card_num", "credit_card_tye", "old_credit_card_num", "monthly_cc_draft", "mi_on_bank_acct", "mi_on_credit_card", "last_name_on_back_acct", "last_name_on_credit_card", "first_name_on_bank_acct", "first_name_on_credit_card", "pct_day1", "pct_day2", "pct_day3", "pct_day4", "pct_time1_in", "pct_time1_out", "pct_time2_in", "pct_time2_out", "pct_time3_in", "pct_time3_out", "pct_time4_in", "pct_time4_out", "pct_court1_num", "pct_court2_num", "pct_court3_num", "pct_court4_num", "cell_phone" ) VALUES ( {ml r."id_num"}, {ml r."account_num"}, {ml r."account_status"}, {ml r."card_num"}, {ml r."joint_accont_num"}, {ml r."first_name"}, {ml r."last_name"}, {ml r."mi"}, {ml r."generation"}, {ml r."street_num"}, {ml r."street_name"}, {ml r."second_line_address"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."home_phone"}, {ml r."work_phone"}, {ml r."work_ext"}, {ml r."emp_name"}, {ml r."ssn"}, {ml r."dob"}, {ml r."month_of_dob"}, {ml r."sex"}, {ml r."source_code"}, {ml r."contract_date"}, {ml r."contract_expir_date"}, {ml r."name_of_contract"}, {ml r."term_of_contract"}, {ml r."cash_price_of_contract"}, {ml r."total_of_sale"}, {ml r."down_payment"}, {ml r."number_of_payments"}, {ml r."amount_of_payment"}, {ml r."remaining_num_of_payments"}, {ml r."total_of_all_payments"}, {ml r."first_payment_due_date"}, {ml r."next_payment_due_date"}, {ml r."method_of_payment"}, {ml r."remaining_bal_on_contract"}, {ml r."current_paymts_due"}, {ml r."deliq_1to10_day_due"}, {ml r."deliq_11_to30_days_due"}, {ml r."deliq_30to60_days_due"}, {ml r."deliq_61to90_days_due"}, {ml r."deliq_90to120_days_due"}, {ml r."over_120_days"}, {ml r."total_paymt_due"}, {ml r."late_fees_owed"}, {ml r."return_fees_owed"}, {ml r."service_fees_owed"}, {ml r."total_amt_due_now"}, {ml r."payoff_amt"}, {ml r."method_of_last_paymt_recd"}, {ml r."total_amt_of_last_payment"}, {ml r."date_of_last_paymt"}, {ml r."amt_applied_to_paymts"}, {ml r."amt_applied_to_late_fees"}, {ml r."amt_applied_to_return_fees"}, {ml r."amt_applied_to_service_fees"}, {ml r."days_deliq_when_recieved"}, {ml r."num_of_days_late"}, {ml r."billing_cycle"}, {ml r."renewal_date"}, {ml r."renewal_amt"}, {ml r."renewal_term"}, {ml r."mail_invoice"}, {ml r."member_since"}, {ml r."original_contrat_date"}, {ml r."total_money_paid_to_date"}, {ml r."date_account_entered"}, {ml r."notes_line_one"}, {ml r."notes_line_two"}, {ml r."description"}, {ml r."credit"}, {ml r."court_num"}, {ml r."court_date"}, {ml r."court_time"}, {ml r."taxable"}, {ml r."date_of_last_visit"}, {ml r."client_num"}, {ml r."number_of_visits"}, {ml r."misc_field"}, {ml r."cancel_acc_after_date"}, {ml r."id_picture"}, {ml r."number_of_pb_mailed"}, {ml r."date_of_last_pb"}, {ml r."email_address"}, {ml r."with_another_agency"}, {ml r."height"}, {ml r."weight"}, {ml r."eye_color"}, {ml r."hair_color"}, {ml r."bad_address"}, {ml r."bad_home_num"}, {ml r."bad_work_num"}, {ml r."purge_from_sys"}, {ml r."interest_saved"}, {ml r."total_payoff_amt"}, {ml r."monthly_draft_amt"}, {ml r."date_of_return"}, {ml r."reason_returned"}, {ml r."amount_of_return"}, {ml r."due_date_of_return"}, {ml r."fist_sale_person"}, {ml r."sec_sale_person"}, {ml r."date_1st_renewal_mailed"}, {ml r."date_2nd_renewal_mailed"}, {ml r."date_of_collection_letter"}, {ml r."date_sent_to_trw"}, {ml r."num_of_lat_notices_maild"}, {ml r."date_of_last_late_notice"}, {ml r."rewrite_date"}, {ml r."finance_percentage"}, {ml r."amount_of_finance_charge"}, {ml r."financed_amount"}, {ml r."num_of_times_charged"}, {ml r."num_of_times_to_charge"}, {ml r."special_charg_discript"}, {ml r."first_date_to_charge"}, {ml r."next_date_to_charge"}, {ml r."amt_of_special_chrg"}, {ml r."total_princ_plus_fin_due"}, {ml r."club_database"}, {ml r."credit_date"}, {ml r."bank_name"}, {ml r."bank_address"}, {ml r."bank_city"}, {ml r."bank_state"}, {ml r."bank_zip"}, {ml r."routing_num"}, {ml r."bank_acc_num"}, {ml r."credit_card_exprtion_date"}, {ml r."credit_card_name"}, {ml r."credit_card_num"}, {ml r."credit_card_tye"}, {ml r."old_credit_card_num"}, {ml r."monthly_cc_draft"}, {ml r."mi_on_bank_acct"}, {ml r."mi_on_credit_card"}, {ml r."last_name_on_back_acct"}, {ml r."last_name_on_credit_card"}, {ml r."first_name_on_bank_acct"}, {ml r."first_name_on_credit_card"}, {ml r."pct_day1"}, {ml r."pct_day2"}, {ml r."pct_day3"}, {ml r."pct_day4"}, {ml r."pct_time1_in"}, {ml r."pct_time1_out"}, {ml r."pct_time2_in"}, {ml r."pct_time2_out"}, {ml r."pct_time3_in"}, {ml r."pct_time3_out"}, {ml r."pct_time4_in"}, {ml r."pct_time4_out"}, {ml r."pct_court1_num"}, {ml r."pct_court2_num"}, {ml r."pct_court3_num"}, {ml r."pct_court4_num"}, {ml r."cell_phone"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'member_file', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."member_file" SET "account_num" = {ml r."account_num"}, "account_status" = {ml r."account_status"}, "card_num" = {ml r."card_num"}, "joint_accont_num" = {ml r."joint_accont_num"}, "first_name" = {ml r."first_name"}, "last_name" = {ml r."last_name"}, "mi" = {ml r."mi"}, "generation" = {ml r."generation"}, "street_num" = {ml r."street_num"}, "street_name" = {ml r."street_name"}, "second_line_address" = {ml r."second_line_address"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "home_phone" = {ml r."home_phone"}, "work_phone" = {ml r."work_phone"}, "work_ext" = {ml r."work_ext"}, "emp_name" = {ml r."emp_name"}, "ssn" = {ml r."ssn"}, "dob" = {ml r."dob"}, "month_of_dob" = {ml r."month_of_dob"}, "sex" = {ml r."sex"}, "source_code" = {ml r."source_code"}, "contract_date" = {ml r."contract_date"}, "contract_expir_date" = {ml r."contract_expir_date"}, "name_of_contract" = {ml r."name_of_contract"}, "term_of_contract" = {ml r."term_of_contract"}, "cash_price_of_contract" = {ml r."cash_price_of_contract"}, "total_of_sale" = {ml r."total_of_sale"}, "down_payment" = {ml r."down_payment"}, "number_of_payments" = {ml r."number_of_payments"}, "amount_of_payment" = {ml r."amount_of_payment"}, "remaining_num_of_payments" = {ml r."remaining_num_of_payments"}, "total_of_all_payments" = {ml r."total_of_all_payments"}, "first_payment_due_date" = {ml r."first_payment_due_date"}, "next_payment_due_date" = {ml r."next_payment_due_date"}, "method_of_payment" = {ml r."method_of_payment"}, "remaining_bal_on_contract" = {ml r."remaining_bal_on_contract"}, "current_paymts_due" = {ml r."current_paymts_due"}, "deliq_1to10_day_due" = {ml r."deliq_1to10_day_due"}, "deliq_11_to30_days_due" = {ml r."deliq_11_to30_days_due"}, "deliq_30to60_days_due" = {ml r."deliq_30to60_days_due"}, "deliq_61to90_days_due" = {ml r."deliq_61to90_days_due"}, "deliq_90to120_days_due" = {ml r."deliq_90to120_days_due"}, "over_120_days" = {ml r."over_120_days"}, "total_paymt_due" = {ml r."total_paymt_due"}, "late_fees_owed" = {ml r."late_fees_owed"}, "return_fees_owed" = {ml r."return_fees_owed"}, "service_fees_owed" = {ml r."service_fees_owed"}, "total_amt_due_now" = {ml r."total_amt_due_now"}, "payoff_amt" = {ml r."payoff_amt"}, "method_of_last_paymt_recd" = {ml r."method_of_last_paymt_recd"}, "total_amt_of_last_payment" = {ml r."total_amt_of_last_payment"}, "date_of_last_paymt" = {ml r."date_of_last_paymt"}, "amt_applied_to_paymts" = {ml r."amt_applied_to_paymts"}, "amt_applied_to_late_fees" = {ml r."amt_applied_to_late_fees"}, "amt_applied_to_return_fees" = {ml r."amt_applied_to_return_fees"}, "amt_applied_to_service_fees" = {ml r."amt_applied_to_service_fees"}, "days_deliq_when_recieved" = {ml r."days_deliq_when_recieved"}, "num_of_days_late" = {ml r."num_of_days_late"}, "billing_cycle" = {ml r."billing_cycle"}, "renewal_date" = {ml r."renewal_date"}, "renewal_amt" = {ml r."renewal_amt"}, "renewal_term" = {ml r."renewal_term"}, "mail_invoice" = {ml r."mail_invoice"}, "member_since" = {ml r."member_since"}, "original_contrat_date" = {ml r."original_contrat_date"}, "total_money_paid_to_date" = {ml r."total_money_paid_to_date"}, "date_account_entered" = {ml r."date_account_entered"}, "notes_line_one" = {ml r."notes_line_one"}, "notes_line_two" = {ml r."notes_line_two"}, "description" = {ml r."description"}, "credit" = {ml r."credit"}, "court_num" = {ml r."court_num"}, "court_date" = {ml r."court_date"}, "court_time" = {ml r."court_time"}, "taxable" = {ml r."taxable"}, "date_of_last_visit" = {ml r."date_of_last_visit"}, "number_of_visits" = {ml r."number_of_visits"}, "misc_field" = {ml r."misc_field"}, "cancel_acc_after_date" = {ml r."cancel_acc_after_date"}, "id_picture" = {ml r."id_picture"}, "number_of_pb_mailed" = {ml r."number_of_pb_mailed"}, "date_of_last_pb" = {ml r."date_of_last_pb"}, "email_address" = {ml r."email_address"}, "with_another_agency" = {ml r."with_another_agency"}, "height" = {ml r."height"}, "weight" = {ml r."weight"}, "eye_color" = {ml r."eye_color"}, "hair_color" = {ml r."hair_color"}, "bad_address" = {ml r."bad_address"}, "bad_home_num" = {ml r."bad_home_num"}, "bad_work_num" = {ml r."bad_work_num"}, "purge_from_sys" = {ml r."purge_from_sys"}, "interest_saved" = {ml r."interest_saved"}, "total_payoff_amt" = {ml r."total_payoff_amt"}, "monthly_draft_amt" = {ml r."monthly_draft_amt"}, "date_of_return" = {ml r."date_of_return"}, "reason_returned" = {ml r."reason_returned"}, "amount_of_return" = {ml r."amount_of_return"}, "due_date_of_return" = {ml r."due_date_of_return"}, "fist_sale_person" = {ml r."fist_sale_person"}, "sec_sale_person" = {ml r."sec_sale_person"}, "date_1st_renewal_mailed" = {ml r."date_1st_renewal_mailed"}, "date_2nd_renewal_mailed" = {ml r."date_2nd_renewal_mailed"}, "date_of_collection_letter" = {ml r."date_of_collection_letter"}, "date_sent_to_trw" = {ml r."date_sent_to_trw"}, "num_of_lat_notices_maild" = {ml r."num_of_lat_notices_maild"}, "date_of_last_late_notice" = {ml r."date_of_last_late_notice"}, "rewrite_date" = {ml r."rewrite_date"}, "finance_percentage" = {ml r."finance_percentage"}, "amount_of_finance_charge" = {ml r."amount_of_finance_charge"}, "financed_amount" = {ml r."financed_amount"}, "num_of_times_charged" = {ml r."num_of_times_charged"}, "num_of_times_to_charge" = {ml r."num_of_times_to_charge"}, "special_charg_discript" = {ml r."special_charg_discript"}, "first_date_to_charge" = {ml r."first_date_to_charge"}, "next_date_to_charge" = {ml r."next_date_to_charge"}, "amt_of_special_chrg" = {ml r."amt_of_special_chrg"}, "total_princ_plus_fin_due" = {ml r."total_princ_plus_fin_due"}, "club_database" = {ml r."club_database"}, "credit_date" = {ml r."credit_date"}, "bank_name" = {ml r."bank_name"}, "bank_address" = {ml r."bank_address"}, "bank_city" = {ml r."bank_city"}, "bank_state" = {ml r."bank_state"}, "bank_zip" = {ml r."bank_zip"}, "routing_num" = {ml r."routing_num"}, "bank_acc_num" = {ml r."bank_acc_num"}, "credit_card_exprtion_date" = {ml r."credit_card_exprtion_date"}, "credit_card_name" = {ml r."credit_card_name"}, "credit_card_num" = {ml r."credit_card_num"}, "credit_card_tye" = {ml r."credit_card_tye"}, "old_credit_card_num" = {ml r."old_credit_card_num"}, "monthly_cc_draft" = {ml r."monthly_cc_draft"}, "mi_on_bank_acct" = {ml r."mi_on_bank_acct"}, "mi_on_credit_card" = {ml r."mi_on_credit_card"}, "last_name_on_back_acct" = {ml r."last_name_on_back_acct"}, "last_name_on_credit_card" = {ml r."last_name_on_credit_card"}, "first_name_on_bank_acct" = {ml r."first_name_on_bank_acct"}, "first_name_on_credit_card" = {ml r."first_name_on_credit_card"}, "pct_day1" = {ml r."pct_day1"}, "pct_day2" = {ml r."pct_day2"}, "pct_day3" = {ml r."pct_day3"}, "pct_day4" = {ml r."pct_day4"}, "pct_time1_in" = {ml r."pct_time1_in"}, "pct_time1_out" = {ml r."pct_time1_out"}, "pct_time2_in" = {ml r."pct_time2_in"}, "pct_time2_out" = {ml r."pct_time2_out"}, "pct_time3_in" = {ml r."pct_time3_in"}, "pct_time3_out" = {ml r."pct_time3_out"}, "pct_time4_in" = {ml r."pct_time4_in"}, "pct_time4_out" = {ml r."pct_time4_out"}, "pct_court1_num" = {ml r."pct_court1_num"}, "pct_court2_num" = {ml r."pct_court2_num"}, "pct_court3_num" = {ml r."pct_court3_num"}, "pct_court4_num" = {ml r."pct_court4_num"}, "cell_phone" = {ml r."cell_phone"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'pt_form_control', 'download_cursor', 'sql', ' SELECT pt_form_control.id_num, pt_form_control.pt_date_from, pt_form_control.pt_date_to, pt_form_control.pt_due_date1, pt_form_control.pt_due_date2, pt_form_control.pt_year, pt_form_control.return_by_date, pt_form_control.pt_date_from_copy, pt_form_control.pt_date_to_copy, pt_form_control.pt_due_date1_copy, pt_form_control.pt_due_date2_copy, pt_form_control.pt_year_copy, pt_form_control.return_by_date_copy, pt_form_control.client_num FROM DBA.pt_form_control pt_form_control WHERE pt_form_control.last_modified > @last_download AND ( pt_form_control.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE pt_form_control.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'pt_form_control', 'download_delete_cursor', 'sql', ' SELECT DELETED_pt_form_control.id_num, DELETED_pt_form_control.client_num FROM DBA.DELETED_pt_form_control, DBA.EBCS_Clients_PC WHERE DELETED_pt_form_control.deleted_on > @last_download AND DELETED_pt_form_control.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'pt_form_control', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."pt_form_control" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'pt_form_control', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."pt_form_control" ( "id_num", "pt_date_from", "pt_date_to", "pt_due_date1", "pt_due_date2", "pt_year", "return_by_date", "pt_date_from_copy", "pt_date_to_copy", "pt_due_date1_copy", "pt_due_date2_copy", "pt_year_copy", "return_by_date_copy", "client_num" ) VALUES ( {ml r."id_num"}, {ml r."pt_date_from"}, {ml r."pt_date_to"}, {ml r."pt_due_date1"}, {ml r."pt_due_date2"}, {ml r."pt_year"}, {ml r."return_by_date"}, {ml r."pt_date_from_copy"}, {ml r."pt_date_to_copy"}, {ml r."pt_due_date1_copy"}, {ml r."pt_due_date2_copy"}, {ml r."pt_year_copy"}, {ml r."return_by_date_copy"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'pt_form_control', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."pt_form_control" SET "pt_date_from" = {ml r."pt_date_from"}, "pt_date_to" = {ml r."pt_date_to"}, "pt_due_date1" = {ml r."pt_due_date1"}, "pt_due_date2" = {ml r."pt_due_date2"}, "pt_year" = {ml r."pt_year"}, "return_by_date" = {ml r."return_by_date"}, "pt_date_from_copy" = {ml r."pt_date_from_copy"}, "pt_date_to_copy" = {ml r."pt_date_to_copy"}, "pt_due_date1_copy" = {ml r."pt_due_date1_copy"}, "pt_due_date2_copy" = {ml r."pt_due_date2_copy"}, "pt_year_copy" = {ml r."pt_year_copy"}, "return_by_date_copy" = {ml r."return_by_date_copy"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'credit_file', 'download_cursor', 'sql', ' SELECT credit_file.id_num, credit_file.account_num, credit_file.card_num, credit_file.first_name, credit_file.last_name, credit_file.credit_amt, credit_file.invoice_applied_to, credit_file.date_applied, credit_file.date_recieved, credit_file.recipt_num, credit_file.client_num FROM DBA.credit_file credit_file WHERE credit_file.last_modified > @last_download AND ( credit_file.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE credit_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'credit_file', 'download_delete_cursor', 'sql', ' SELECT DELETED_credit_file.id_num, DELETED_credit_file.client_num FROM DBA.DELETED_credit_file DELETED_credit_file, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_credit_file.deleted_on > @last_download AND DELETED_credit_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'credit_file', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."credit_file" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'credit_file', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."credit_file" ( "id_num", "account_num", "card_num", "first_name", "last_name", "credit_amt", "invoice_applied_to", "date_applied", "date_recieved", "recipt_num", "client_num" ) VALUES ( {ml r."id_num"}, {ml r."account_num"}, {ml r."card_num"}, {ml r."first_name"}, {ml r."last_name"}, {ml r."credit_amt"}, {ml r."invoice_applied_to"}, {ml r."date_applied"}, {ml r."date_recieved"}, {ml r."recipt_num"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'credit_file', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."credit_file" SET "account_num" = {ml r."account_num"}, "card_num" = {ml r."card_num"}, "first_name" = {ml r."first_name"}, "last_name" = {ml r."last_name"}, "credit_amt" = {ml r."credit_amt"}, "invoice_applied_to" = {ml r."invoice_applied_to"}, "date_applied" = {ml r."date_applied"}, "date_recieved" = {ml r."date_recieved"}, "recipt_num" = {ml r."recipt_num"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_codes', 'download_cursor', 'sql', ' SELECT tennis_codes.id_num, tennis_codes.description, tennis_codes.code, tennis_codes.price, tennis_codes.time_start, tennis_codes.time_stop, tennis_codes.time_length, tennis_codes.taxable, tennis_codes.tax, tennis_codes.pt_year, tennis_codes.client_num FROM DBA.tennis_codes tennis_codes WHERE tennis_codes.last_modified > @last_download AND ( tennis_codes.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE tennis_codes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_codes', 'download_delete_cursor', 'sql', ' SELECT DELETED_tennis_codes.id_num, DELETED_tennis_codes.client_num FROM DBA.DELETED_tennis_codes DELETED_tennis_codes, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_tennis_codes.deleted_on > @last_download AND DELETED_tennis_codes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_codes', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."tennis_codes" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_codes', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."tennis_codes" ( "id_num", "description", "code", "price", "time_start", "time_stop", "time_length", "taxable", "tax", "pt_year", "client_num" ) VALUES ( {ml r."id_num"}, {ml r."description"}, {ml r."code"}, {ml r."price"}, {ml r."time_start"}, {ml r."time_stop"}, {ml r."time_length"}, {ml r."taxable"}, {ml r."tax"}, {ml r."pt_year"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_codes', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."tennis_codes" SET "description" = {ml r."description"}, "code" = {ml r."code"}, "price" = {ml r."price"}, "time_start" = {ml r."time_start"}, "time_stop" = {ml r."time_stop"}, "time_length" = {ml r."time_length"}, "taxable" = {ml r."taxable"}, "tax" = {ml r."tax"}, "pt_year" = {ml r."pt_year"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_control_file', 'download_cursor', 'sql', ' SELECT tennis_control_file.id_num, tennis_control_file.contrat_description, tennis_control_file.contract_type, tennis_control_file.price, tennis_control_file.tax, tennis_control_file.amt_of_payment, tennis_control_file.message_line_one, tennis_control_file.message_line_two, tennis_control_file.pt_year, tennis_control_file.pt_date_from, tennis_control_file.pt_date_to, tennis_control_file.pt_due_date1, tennis_control_file.pt_due_date2, tennis_control_file.return_by_date, tennis_control_file.client_num FROM DBA.tennis_control_file tennis_control_file WHERE tennis_control_file.last_modified > @last_download AND ( tennis_control_file.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE tennis_control_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_control_file', 'download_delete_cursor', 'sql', ' SELECT DELETED_tennis_control_file.id_num, DELETED_tennis_control_file.client_num FROM DBA.DELETED_tennis_control_file DELETED_tennis_control_file, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_tennis_control_file.deleted_on > @last_download AND DELETED_tennis_control_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_control_file', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."tennis_control_file" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_control_file', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."tennis_control_file" ( "id_num", "contrat_description", "contract_type", "price", "tax", "amt_of_payment", "message_line_one", "message_line_two", "pt_year", "pt_date_from", "pt_date_to", "pt_due_date1", "pt_due_date2", "return_by_date", "client_num" ) VALUES ( {ml r."id_num"}, {ml r."contrat_description"}, {ml r."contract_type"}, {ml r."price"}, {ml r."tax"}, {ml r."amt_of_payment"}, {ml r."message_line_one"}, {ml r."message_line_two"}, {ml r."pt_year"}, {ml r."pt_date_from"}, {ml r."pt_date_to"}, {ml r."pt_due_date1"}, {ml r."pt_due_date2"}, {ml r."return_by_date"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tennis_control_file', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."tennis_control_file" SET "contrat_description" = {ml r."contrat_description"}, "contract_type" = {ml r."contract_type"}, "price" = {ml r."price"}, "tax" = {ml r."tax"}, "amt_of_payment" = {ml r."amt_of_payment"}, "message_line_one" = {ml r."message_line_one"}, "message_line_two" = {ml r."message_line_two"}, "pt_year" = {ml r."pt_year"}, "pt_date_from" = {ml r."pt_date_from"}, "pt_date_to" = {ml r."pt_date_to"}, "pt_due_date1" = {ml r."pt_due_date1"}, "pt_due_date2" = {ml r."pt_due_date2"}, "return_by_date" = {ml r."return_by_date"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'history', 'download_cursor', 'sql', ' SELECT history.id_num, history.account_num, history.amt_paid, history.balance_owed, history.date_of_invoice, history.days_late, history.description, history.fname, history.invoice_amt, history.lname, history.mname, history.amt_rec, history.date_rec, history.mop, history.type, history.due_date, history.invoice_num, history.taxable, history.tax_amt, history.invoice_number, history.client_num FROM DBA.history history WHERE history.last_modified > @last_download AND ( history.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE history.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'history', 'download_delete_cursor', 'sql', ' SELECT DELETED_history.id_num, DELETED_history.client_num FROM DBA.DELETED_history DELETED_history, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_history.deleted_on > @last_download AND DELETED_history.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'history', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."history" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'history', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."history" ( "id_num", "account_num", "amt_paid", "balance_owed", "date_of_invoice", "days_late", "description", "fname", "invoice_amt", "lname", "mname", "amt_rec", "date_rec", "mop", "type", "due_date", "invoice_num", "taxable", "tax_amt", "invoice_number", "client_num" ) VALUES ( {ml r."id_num"}, {ml r."account_num"}, {ml r."amt_paid"}, {ml r."balance_owed"}, {ml r."date_of_invoice"}, {ml r."days_late"}, {ml r."description"}, {ml r."fname"}, {ml r."invoice_amt"}, {ml r."lname"}, {ml r."mname"}, {ml r."amt_rec"}, {ml r."date_rec"}, {ml r."mop"}, {ml r."type"}, {ml r."due_date"}, {ml r."invoice_num"}, {ml r."taxable"}, {ml r."tax_amt"}, {ml r."invoice_number"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'history', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."history" SET "account_num" = {ml r."account_num"}, "amt_paid" = {ml r."amt_paid"}, "balance_owed" = {ml r."balance_owed"}, "date_of_invoice" = {ml r."date_of_invoice"}, "days_late" = {ml r."days_late"}, "description" = {ml r."description"}, "fname" = {ml r."fname"}, "invoice_amt" = {ml r."invoice_amt"}, "lname" = {ml r."lname"}, "mname" = {ml r."mname"}, "amt_rec" = {ml r."amt_rec"}, "date_rec" = {ml r."date_rec"}, "mop" = {ml r."mop"}, "type" = {ml r."type"}, "due_date" = {ml r."due_date"}, "invoice_num" = {ml r."invoice_num"}, "taxable" = {ml r."taxable"}, "tax_amt" = {ml r."tax_amt"}, "invoice_number" = {ml r."invoice_number"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cash_file', 'download_cursor', 'sql', ' SELECT cash_file.id_num, cash_file.lname, cash_file.fname, cash_file.mname, cash_file.account_num, cash_file.date_rec, cash_file.amt_rec, cash_file.mop, cash_file.posted_to_history, cash_file.invoice_applied_to, cash_file.amt_applied, cash_file.invoice_number, cash_file.client_num FROM DBA.cash_file WHERE cash_file.last_modified > @last_download AND ( cash_file.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE cash_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cash_file', 'download_delete_cursor', 'sql', ' SELECT DELETED_cash_file.id_num, DELETED_cash_file.client_num FROM DBA.DELETED_cash_file, DBA.EBCS_Clients_PC WHERE DELETED_cash_file.deleted_on > @last_download AND DELETED_cash_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cash_file', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."cash_file" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cash_file', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."cash_file" ( "id_num", "lname", "fname", "mname", "account_num", "date_rec", "amt_rec", "mop", "posted_to_history", "invoice_applied_to", "amt_applied", "invoice_number", "client_num" ) VALUES ( {ml r."id_num"}, {ml r."lname"}, {ml r."fname"}, {ml r."mname"}, {ml r."account_num"}, {ml r."date_rec"}, {ml r."amt_rec"}, {ml r."mop"}, {ml r."posted_to_history"}, {ml r."invoice_applied_to"}, {ml r."amt_applied"}, {ml r."invoice_number"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'cash_file', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."cash_file" SET "lname" = {ml r."lname"}, "fname" = {ml r."fname"}, "mname" = {ml r."mname"}, "account_num" = {ml r."account_num"}, "date_rec" = {ml r."date_rec"}, "amt_rec" = {ml r."amt_rec"}, "mop" = {ml r."mop"}, "posted_to_history" = {ml r."posted_to_history"}, "invoice_applied_to" = {ml r."invoice_applied_to"}, "amt_applied" = {ml r."amt_applied"}, "invoice_number" = {ml r."invoice_number"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'invoice_file', 'download_cursor', 'sql', ' SELECT invoice_file.lname, invoice_file.fname, invoice_file.mname, invoice_file.id_num, invoice_file.account_num, invoice_file.date_of_invoice, invoice_file.invoice_amt, invoice_file.amt_paid, invoice_file.balance_owed, invoice_file.posted_to_history, invoice_file.description, invoice_file.days_late, invoice_file.satisfied, invoice_file.type, invoice_file.due_date, invoice_file.taxable, invoice_file.invoice_number, invoice_file.tax_amt, invoice_file.client_num FROM DBA.invoice_file WHERE invoice_file.last_modified > @last_download AND ( invoice_file.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE invoice_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'invoice_file', 'download_delete_cursor', 'sql', ' SELECT DELETED_invoice_file.id_num, DELETED_invoice_file.client_num FROM DBA.DELETED_invoice_file DELETED_invoice_file, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_invoice_file.deleted_on > @last_download AND DELETED_invoice_file.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'invoice_file', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."invoice_file" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'invoice_file', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."invoice_file" ( "lname", "fname", "mname", "id_num", "account_num", "date_of_invoice", "invoice_amt", "amt_paid", "balance_owed", "posted_to_history", "description", "days_late", "satisfied", "type", "due_date", "taxable", "invoice_number", "tax_amt", "client_num" ) VALUES ( {ml r."lname"}, {ml r."fname"}, {ml r."mname"}, {ml r."id_num"}, {ml r."account_num"}, {ml r."date_of_invoice"}, {ml r."invoice_amt"}, {ml r."amt_paid"}, {ml r."balance_owed"}, {ml r."posted_to_history"}, {ml r."description"}, {ml r."days_late"}, {ml r."satisfied"}, {ml r."type"}, {ml r."due_date"}, {ml r."taxable"}, {ml r."invoice_number"}, {ml r."tax_amt"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'invoice_file', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."invoice_file" SET "lname" = {ml r."lname"}, "fname" = {ml r."fname"}, "mname" = {ml r."mname"}, "account_num" = {ml r."account_num"}, "date_of_invoice" = {ml r."date_of_invoice"}, "invoice_amt" = {ml r."invoice_amt"}, "amt_paid" = {ml r."amt_paid"}, "balance_owed" = {ml r."balance_owed"}, "posted_to_history" = {ml r."posted_to_history"}, "description" = {ml r."description"}, "days_late" = {ml r."days_late"}, "satisfied" = {ml r."satisfied"}, "type" = {ml r."type"}, "due_date" = {ml r."due_date"}, "taxable" = {ml r."taxable"}, "invoice_number" = {ml r."invoice_number"}, "tax_amt" = {ml r."tax_amt"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator_pos', 'download_cursor', 'sql', ' SELECT card_generator_pos.new_card_generator, card_generator_pos.id_num, card_generator_pos.product_name, card_generator_pos.client_num FROM DBA.card_generator_pos card_generator_pos WHERE card_generator_pos.last_modified > @last_download AND ( card_generator_pos.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE card_generator_pos.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator_pos', 'download_delete_cursor', 'sql', ' SELECT DELETED_card_generator_pos.id_num, DELETED_card_generator_pos.client_num FROM DBA.DELETED_card_generator_pos DELETED_card_generator_pos, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_card_generator_pos.deleted_on > @last_download AND DELETED_card_generator_pos.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator_pos', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."card_generator_pos" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator_pos', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."card_generator_pos" ( "new_card_generator", "id_num", "product_name", "client_num" ) VALUES ( {ml r."new_card_generator"}, {ml r."id_num"}, {ml r."product_name"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator_pos', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."card_generator_pos" SET "new_card_generator" = {ml r."new_card_generator"}, "product_name" = {ml r."product_name"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'courts', 'download_cursor', 'sql', ' SELECT courts.type_of_court, courts.court_num, courts.court_pic, courts.cout_pic_path, courts.client_num FROM DBA.courts courts WHERE courts.last_modified > @last_download AND ( courts.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE courts.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'courts', 'download_delete_cursor', 'sql', ' SELECT DELETED_courts.type_of_court, DELETED_courts.court_num, DELETED_courts.client_num FROM DBA.DELETED_courts DELETED_courts, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_courts.deleted_on > @last_download AND DELETED_courts.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'courts', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."courts" WHERE "type_of_court" = {ml r."type_of_court"} AND "court_num" = {ml r."court_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'courts', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."courts" ( "type_of_court", "court_num", "court_pic", "cout_pic_path", "client_num" ) VALUES ( {ml r."type_of_court"}, {ml r."court_num"}, {ml r."court_pic"}, {ml r."cout_pic_path"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'courts', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."courts" SET "court_pic" = {ml r."court_pic"}, "cout_pic_path" = {ml r."cout_pic_path"} WHERE "type_of_court" = {ml r."type_of_court"} AND "court_num" = {ml r."court_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'court_prices', 'download_cursor', 'sql', ' SELECT court_prices.type_of_court, court_prices.court_num, court_prices.price_per_hour, court_prices.price_per_half, court_prices.price_per_person, court_prices.price_per_non_member, court_prices.day_rate, court_prices.special_rate_one, court_prices.special_rate_two, court_prices.special_rate_three, court_prices.client_num FROM DBA.court_prices court_prices WHERE court_prices.last_modified > @last_download AND ( court_prices.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE court_prices.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'court_prices', 'download_delete_cursor', 'sql', ' SELECT DELETED_court_prices.type_of_court, DELETED_court_prices.court_num, DELETED_court_prices.client_num FROM DBA.DELETED_court_prices DELETED_court_prices, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_court_prices.deleted_on > @last_download AND DELETED_court_prices.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'court_prices', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."court_prices" WHERE "type_of_court" = {ml r."type_of_court"} AND "court_num" = {ml r."court_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'court_prices', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."court_prices" ( "type_of_court", "court_num", "price_per_hour", "price_per_half", "price_per_person", "price_per_non_member", "day_rate", "special_rate_one", "special_rate_two", "special_rate_three", "client_num" ) VALUES ( {ml r."type_of_court"}, {ml r."court_num"}, {ml r."price_per_hour"}, {ml r."price_per_half"}, {ml r."price_per_person"}, {ml r."price_per_non_member"}, {ml r."day_rate"}, {ml r."special_rate_one"}, {ml r."special_rate_two"}, {ml r."special_rate_three"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'court_prices', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."court_prices" SET "price_per_hour" = {ml r."price_per_hour"}, "price_per_half" = {ml r."price_per_half"}, "price_per_person" = {ml r."price_per_person"}, "price_per_non_member" = {ml r."price_per_non_member"}, "day_rate" = {ml r."day_rate"}, "special_rate_one" = {ml r."special_rate_one"}, "special_rate_two" = {ml r."special_rate_two"}, "special_rate_three" = {ml r."special_rate_three"} WHERE "type_of_court" = {ml r."type_of_court"} AND "court_num" = {ml r."court_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator', 'download_cursor', 'sql', ' SELECT card_generator.new_card_generator, card_generator.id_num, card_generator.client_num FROM DBA.card_generator card_generator WHERE card_generator.last_modified > @last_download AND ( card_generator.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE card_generator.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator', 'download_delete_cursor', 'sql', ' SELECT DELETED_card_generator.id_num, DELETED_card_generator.client_num FROM DBA.DELETED_card_generator DELETED_card_generator, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_card_generator.deleted_on > @last_download AND DELETED_card_generator.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."card_generator" WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."card_generator" ( "new_card_generator", "id_num", "client_num" ) VALUES ( {ml r."new_card_generator"}, {ml r."id_num"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'card_generator', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."card_generator" SET "new_card_generator" = {ml r."new_card_generator"} WHERE "id_num" = {ml r."id_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'baby_sit', 'download_cursor', 'sql', ' SELECT baby_sit.fname, baby_sit.lname, baby_sit.account_num, baby_sit.bacode_num, baby_sit.total_price, baby_sit.per_session_price, baby_sit.trainer_name, baby_sit.number_of_sessions, baby_sit.session_remaning, baby_sit.date_start, baby_sit.date_end, baby_sit.misc_notes, baby_sit.date_of_last_session, baby_sit.date_of_session, baby_sit.time_of_session, baby_sit.current_rank, baby_sit.date_recieved, baby_sit.test_date, baby_sit.points, baby_sit.point_type, baby_sit.belt_color, baby_sit.sessions_used, baby_sit.client_num FROM DBA.baby_sit baby_sit WHERE baby_sit.last_modified > @last_download AND ( baby_sit.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE baby_sit.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'baby_sit', 'download_delete_cursor', 'sql', ' SELECT DELETED_baby_sit.account_num, DELETED_baby_sit.client_num FROM DBA.DELETED_baby_sit DELETED_baby_sit, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_baby_sit.deleted_on > @last_download AND DELETED_baby_sit.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'baby_sit', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."baby_sit" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'baby_sit', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."baby_sit" ( "fname", "lname", "account_num", "bacode_num", "total_price", "per_session_price", "trainer_name", "number_of_sessions", "session_remaning", "date_start", "date_end", "misc_notes", "date_of_last_session", "date_of_session", "time_of_session", "current_rank", "date_recieved", "test_date", "points", "point_type", "belt_color", "sessions_used", "client_num" ) VALUES ( {ml r."fname"}, {ml r."lname"}, {ml r."account_num"}, {ml r."bacode_num"}, {ml r."total_price"}, {ml r."per_session_price"}, {ml r."trainer_name"}, {ml r."number_of_sessions"}, {ml r."session_remaning"}, {ml r."date_start"}, {ml r."date_end"}, {ml r."misc_notes"}, {ml r."date_of_last_session"}, {ml r."date_of_session"}, {ml r."time_of_session"}, {ml r."current_rank"}, {ml r."date_recieved"}, {ml r."test_date"}, {ml r."points"}, {ml r."point_type"}, {ml r."belt_color"}, {ml r."sessions_used"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'baby_sit', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."baby_sit" SET "fname" = {ml r."fname"}, "lname" = {ml r."lname"}, "bacode_num" = {ml r."bacode_num"}, "total_price" = {ml r."total_price"}, "per_session_price" = {ml r."per_session_price"}, "trainer_name" = {ml r."trainer_name"}, "number_of_sessions" = {ml r."number_of_sessions"}, "session_remaning" = {ml r."session_remaning"}, "date_start" = {ml r."date_start"}, "date_end" = {ml r."date_end"}, "misc_notes" = {ml r."misc_notes"}, "date_of_last_session" = {ml r."date_of_last_session"}, "date_of_session" = {ml r."date_of_session"}, "time_of_session" = {ml r."time_of_session"}, "current_rank" = {ml r."current_rank"}, "date_recieved" = {ml r."date_recieved"}, "test_date" = {ml r."test_date"}, "points" = {ml r."points"}, "point_type" = {ml r."point_type"}, "belt_color" = {ml r."belt_color"}, "sessions_used" = {ml r."sessions_used"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'karate', 'download_cursor', 'sql', ' SELECT karate.fname, karate.lname, karate.account_num, karate.bacode_num, karate.total_price, karate.per_session_price, karate.trainer_name, karate.number_of_sessions, karate.session_remaning, karate.date_start, karate.date_end, karate.misc_notes, karate.date_of_last_session, karate.date_of_session, karate.time_of_session, karate.current_rank, karate.date_recieved, karate.test_date, karate.points, karate.point_type, karate.belt_color, karate.sessions_used, karate.client_num FROM DBA.karate karate WHERE karate.last_modified > @last_download AND ( karate.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE karate.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'karate', 'download_delete_cursor', 'sql', ' SELECT DELETED_karate.account_num, DELETED_karate.client_num FROM DBA.DELETED_karate DELETED_karate, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_karate.deleted_on > @last_download AND DELETED_karate.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'karate', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."karate" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'karate', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."karate" ( "fname", "lname", "account_num", "bacode_num", "total_price", "per_session_price", "trainer_name", "number_of_sessions", "session_remaning", "date_start", "date_end", "misc_notes", "date_of_last_session", "date_of_session", "time_of_session", "current_rank", "date_recieved", "test_date", "points", "point_type", "belt_color", "sessions_used", "client_num" ) VALUES ( {ml r."fname"}, {ml r."lname"}, {ml r."account_num"}, {ml r."bacode_num"}, {ml r."total_price"}, {ml r."per_session_price"}, {ml r."trainer_name"}, {ml r."number_of_sessions"}, {ml r."session_remaning"}, {ml r."date_start"}, {ml r."date_end"}, {ml r."misc_notes"}, {ml r."date_of_last_session"}, {ml r."date_of_session"}, {ml r."time_of_session"}, {ml r."current_rank"}, {ml r."date_recieved"}, {ml r."test_date"}, {ml r."points"}, {ml r."point_type"}, {ml r."belt_color"}, {ml r."sessions_used"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'karate', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."karate" SET "fname" = {ml r."fname"}, "lname" = {ml r."lname"}, "bacode_num" = {ml r."bacode_num"}, "total_price" = {ml r."total_price"}, "per_session_price" = {ml r."per_session_price"}, "trainer_name" = {ml r."trainer_name"}, "number_of_sessions" = {ml r."number_of_sessions"}, "session_remaning" = {ml r."session_remaning"}, "date_start" = {ml r."date_start"}, "date_end" = {ml r."date_end"}, "misc_notes" = {ml r."misc_notes"}, "date_of_last_session" = {ml r."date_of_last_session"}, "date_of_session" = {ml r."date_of_session"}, "time_of_session" = {ml r."time_of_session"}, "current_rank" = {ml r."current_rank"}, "date_recieved" = {ml r."date_recieved"}, "test_date" = {ml r."test_date"}, "points" = {ml r."points"}, "point_type" = {ml r."point_type"}, "belt_color" = {ml r."belt_color"}, "sessions_used" = {ml r."sessions_used"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'time_clock_punches', 'download_cursor', 'sql', ' SELECT time_clock_punches.employee_num, time_clock_punches.actual_date, time_clock_punches.actual_time, time_clock_punches.p_type, time_clock_punches.error, time_clock_punches.p_date, time_clock_punches.p_time, time_clock_punches.adjusted_by, time_clock_punches.pay_period_start, time_clock_punches.pay_period_end, time_clock_punches.p_time_out, time_clock_punches.notes, time_clock_punches.payroll_num, time_clock_punches.p_date_out, time_clock_punches.client_num FROM DBA.time_clock_punches time_clock_punches WHERE time_clock_punches.last_modified > @last_download AND ( time_clock_punches.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE time_clock_punches.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'time_clock_punches', 'download_delete_cursor', 'sql', ' SELECT DELETED_time_clock_punches.employee_num, DELETED_time_clock_punches.actual_date, DELETED_time_clock_punches.actual_time, DELETED_time_clock_punches.client_num FROM DBA.DELETED_time_clock_punches DELETED_time_clock_punches, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_time_clock_punches.deleted_on > @last_download AND DELETED_time_clock_punches.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'time_clock_punches', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."time_clock_punches" WHERE "employee_num" = {ml r."employee_num"} AND "actual_date" = {ml r."actual_date"} AND "actual_time" = {ml r."actual_time"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'time_clock_punches', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."time_clock_punches" ( "employee_num", "actual_date", "actual_time", "p_type", "error", "p_date", "p_time", "adjusted_by", "pay_period_start", "pay_period_end", "p_time_out", "notes", "payroll_num", "p_date_out", "client_num" ) VALUES ( {ml r."employee_num"}, {ml r."actual_date"}, {ml r."actual_time"}, {ml r."p_type"}, {ml r."error"}, {ml r."p_date"}, {ml r."p_time"}, {ml r."adjusted_by"}, {ml r."pay_period_start"}, {ml r."pay_period_end"}, {ml r."p_time_out"}, {ml r."notes"}, {ml r."payroll_num"}, {ml r."p_date_out"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'time_clock_punches', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."time_clock_punches" SET "p_type" = {ml r."p_type"}, "error" = {ml r."error"}, "p_date" = {ml r."p_date"}, "p_time" = {ml r."p_time"}, "adjusted_by" = {ml r."adjusted_by"}, "pay_period_start" = {ml r."pay_period_start"}, "pay_period_end" = {ml r."pay_period_end"}, "p_time_out" = {ml r."p_time_out"}, "notes" = {ml r."notes"}, "payroll_num" = {ml r."payroll_num"}, "p_date_out" = {ml r."p_date_out"} WHERE "employee_num" = {ml r."employee_num"} AND "actual_date" = {ml r."actual_date"} AND "actual_time" = {ml r."actual_time"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'employee_profile', 'download_cursor', 'sql', ' SELECT employee_profile.employee_num, employee_profile.card_num, employee_profile.last_name, employee_profile.first_name, employee_profile.middle, employee_profile.street, employee_profile.city, employee_profile.state, employee_profile.zip, employee_profile.phone, employee_profile.title, employee_profile.dept, employee_profile.hire_date, employee_profile.exemptions, employee_profile.ssn, employee_profile.status, employee_profile.security_level, employee_profile.password, employee_profile.release_date, employee_profile.hour_rate, employee_profile.salary_rate, employee_profile.notes, employee_profile.commision, employee_profile.bonus, employee_profile.health, employee_profile.car_alloance, employee_profile.employee_notes, employee_profile.payroll_num, employee_profile.salesperson_yn, employee_profile.client_num, employee_profile.manager_yn FROM DBA.employee_profile employee_profile WHERE employee_profile.last_modified > @last_download AND ( employee_profile.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE employee_profile.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'employee_profile', 'download_delete_cursor', 'sql', ' SELECT DELETED_employee_profile.employee_num, DELETED_employee_profile.client_num FROM DBA.DELETED_employee_profile DELETED_employee_profile, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_employee_profile.deleted_on > @last_download AND DELETED_employee_profile.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'employee_profile', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."employee_profile" WHERE "employee_num" = {ml r."employee_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'employee_profile', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."employee_profile" ( "employee_num", "card_num", "last_name", "first_name", "middle", "street", "city", "state", "zip", "phone", "title", "dept", "hire_date", "exemptions", "ssn", "status", "security_level", "password", "release_date", "hour_rate", "salary_rate", "notes", "commision", "bonus", "health", "car_alloance", "employee_notes", "payroll_num", "salesperson_yn", "client_num", "manager_yn" ) VALUES ( {ml r."employee_num"}, {ml r."card_num"}, {ml r."last_name"}, {ml r."first_name"}, {ml r."middle"}, {ml r."street"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."phone"}, {ml r."title"}, {ml r."dept"}, {ml r."hire_date"}, {ml r."exemptions"}, {ml r."ssn"}, {ml r."status"}, {ml r."security_level"}, {ml r."password"}, {ml r."release_date"}, {ml r."hour_rate"}, {ml r."salary_rate"}, {ml r."notes"}, {ml r."commision"}, {ml r."bonus"}, {ml r."health"}, {ml r."car_alloance"}, {ml r."employee_notes"}, {ml r."payroll_num"}, {ml r."salesperson_yn"}, {ml r."client_num"}, {ml r."manager_yn"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'employee_profile', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."employee_profile" SET "card_num" = {ml r."card_num"}, "last_name" = {ml r."last_name"}, "first_name" = {ml r."first_name"}, "middle" = {ml r."middle"}, "street" = {ml r."street"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "phone" = {ml r."phone"}, "title" = {ml r."title"}, "dept" = {ml r."dept"}, "hire_date" = {ml r."hire_date"}, "exemptions" = {ml r."exemptions"}, "ssn" = {ml r."ssn"}, "status" = {ml r."status"}, "security_level" = {ml r."security_level"}, "password" = {ml r."password"}, "release_date" = {ml r."release_date"}, "hour_rate" = {ml r."hour_rate"}, "salary_rate" = {ml r."salary_rate"}, "notes" = {ml r."notes"}, "commision" = {ml r."commision"}, "bonus" = {ml r."bonus"}, "health" = {ml r."health"}, "car_alloance" = {ml r."car_alloance"}, "employee_notes" = {ml r."employee_notes"}, "payroll_num" = {ml r."payroll_num"}, "salesperson_yn" = {ml r."salesperson_yn"}, "manager_yn" = {ml r."manager_yn"} WHERE "employee_num" = {ml r."employee_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'sounds', 'download_cursor', 'sql', ' SELECT sounds.function_id, sounds.sound_location, sounds.client_num FROM DBA.sounds sounds WHERE sounds.last_modified > @last_download AND ( sounds.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE sounds.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'sounds', 'download_delete_cursor', 'sql', ' SELECT DELETED_sounds.function_id, DELETED_sounds.client_num FROM DBA.DELETED_sounds DELETED_sounds, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_sounds.deleted_on > @last_download AND DELETED_sounds.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'sounds', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."sounds" WHERE "function_id" = {ml r."function_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'sounds', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."sounds" ( "function_id", "sound_location", "client_num" ) VALUES ( {ml r."function_id"}, {ml r."sound_location"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'sounds', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."sounds" SET "sound_location" = {ml r."sound_location"} WHERE "function_id" = {ml r."function_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tanning', 'download_cursor', 'sql', ' SELECT tanning.fname, tanning.lname, tanning.account_num, tanning.bacode_num, tanning.total_price, tanning.per_session_price, tanning.number_of_sessions, tanning.session_remaning, tanning.date_start, tanning.date_end, tanning.misc_notes, tanning.date_of_last_session, tanning.date_of_session, tanning.time_of_session, tanning.sessions_used, tanning.client_num FROM DBA.tanning tanning WHERE tanning.last_modified > @last_download AND ( tanning.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE tanning.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tanning', 'download_delete_cursor', 'sql', ' SELECT DELETED_tanning.account_num, DELETED_tanning.client_num FROM DBA.DELETED_tanning DELETED_tanning, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_tanning.deleted_on > @last_download AND DELETED_tanning.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tanning', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."tanning" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tanning', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."tanning" ( "fname", "lname", "account_num", "bacode_num", "total_price", "per_session_price", "number_of_sessions", "session_remaning", "date_start", "date_end", "misc_notes", "date_of_last_session", "date_of_session", "time_of_session", "sessions_used", "client_num" ) VALUES ( {ml r."fname"}, {ml r."lname"}, {ml r."account_num"}, {ml r."bacode_num"}, {ml r."total_price"}, {ml r."per_session_price"}, {ml r."number_of_sessions"}, {ml r."session_remaning"}, {ml r."date_start"}, {ml r."date_end"}, {ml r."misc_notes"}, {ml r."date_of_last_session"}, {ml r."date_of_session"}, {ml r."time_of_session"}, {ml r."sessions_used"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tanning', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."tanning" SET "fname" = {ml r."fname"}, "lname" = {ml r."lname"}, "bacode_num" = {ml r."bacode_num"}, "total_price" = {ml r."total_price"}, "per_session_price" = {ml r."per_session_price"}, "number_of_sessions" = {ml r."number_of_sessions"}, "session_remaning" = {ml r."session_remaning"}, "date_start" = {ml r."date_start"}, "date_end" = {ml r."date_end"}, "misc_notes" = {ml r."misc_notes"}, "date_of_last_session" = {ml r."date_of_last_session"}, "date_of_session" = {ml r."date_of_session"}, "time_of_session" = {ml r."time_of_session"}, "sessions_used" = {ml r."sessions_used"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'security', 'download_cursor', 'sql', ' SELECT security.register_num, security.unit_price, security.payout, security.inventory, security.customer, security.manage, security.reports, security.percent_major, security.precent_minor, security.precent_level, security.drawer, security.void, security.register, security.x_reading, security.cust_browse, security.client_num FROM DBA.security security WHERE security.last_modified > @last_download AND ( security.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE security.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'security', 'download_delete_cursor', 'sql', ' SELECT DELETED_security.register_num, DELETED_security.client_num FROM DBA.DELETED_security DELETED_security, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_security.deleted_on > @last_download AND DELETED_security.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'security', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."security" WHERE "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'security', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."security" ( "register_num", "unit_price", "payout", "inventory", "customer", "manage", "reports", "percent_major", "precent_minor", "precent_level", "drawer", "void", "register", "x_reading", "cust_browse", "client_num" ) VALUES ( {ml r."register_num"}, {ml r."unit_price"}, {ml r."payout"}, {ml r."inventory"}, {ml r."customer"}, {ml r."manage"}, {ml r."reports"}, {ml r."percent_major"}, {ml r."precent_minor"}, {ml r."precent_level"}, {ml r."drawer"}, {ml r."void"}, {ml r."register"}, {ml r."x_reading"}, {ml r."cust_browse"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'security', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."security" SET "unit_price" = {ml r."unit_price"}, "payout" = {ml r."payout"}, "inventory" = {ml r."inventory"}, "customer" = {ml r."customer"}, "manage" = {ml r."manage"}, "reports" = {ml r."reports"}, "percent_major" = {ml r."percent_major"}, "precent_minor" = {ml r."precent_minor"}, "precent_level" = {ml r."precent_level"}, "drawer" = {ml r."drawer"}, "void" = {ml r."void"}, "register" = {ml r."register"}, "x_reading" = {ml r."x_reading"}, "cust_browse" = {ml r."cust_browse"} WHERE "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'clerk', 'download_cursor', 'sql', ' SELECT clerk.clerk_num, clerk.clerk_name, clerk.clerk_password, clerk.security_level, clerk.client_num FROM DBA.clerk clerk WHERE clerk.last_modified > @last_download AND ( clerk.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE clerk.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'clerk', 'download_delete_cursor', 'sql', ' SELECT DELETED_clerk.clerk_num, DELETED_clerk.client_num FROM DBA.DELETED_clerk DELETED_clerk, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_clerk.deleted_on > @last_download AND DELETED_clerk.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'clerk', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."clerk" WHERE "clerk_num" = {ml r."clerk_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'clerk', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."clerk" ( "clerk_num", "clerk_name", "clerk_password", "security_level", "client_num" ) VALUES ( {ml r."clerk_num"}, {ml r."clerk_name"}, {ml r."clerk_password"}, {ml r."security_level"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'clerk', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."clerk" SET "clerk_name" = {ml r."clerk_name"}, "clerk_password" = {ml r."clerk_password"}, "security_level" = {ml r."security_level"} WHERE "clerk_num" = {ml r."clerk_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'trainer_log', 'download_cursor', 'sql', ' SELECT trainer_log.fname, trainer_log.lname, trainer_log.account_num, trainer_log.barcode_num, trainer_log.total_price, trainer_log.per_session_price, trainer_log.number_of_sessions, trainer_log.sessions_remaining, trainer_log.trainer_name, trainer_log.date_of_last_session, trainer_log.date_of_session, trainer_log.time_of_session, trainer_log.date_start, trainer_log.date_end, trainer_log.service_type, trainer_log.client_num FROM DBA.trainer_log trainer_log WHERE trainer_log.last_modified > @last_download AND ( trainer_log.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE trainer_log.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'trainer_log', 'download_delete_cursor', 'sql', ' SELECT DELETED_trainer_log.account_num, DELETED_trainer_log.date_of_session, DELETED_trainer_log.time_of_session, DELETED_trainer_log.client_num FROM DBA.DELETED_trainer_log DELETED_trainer_log, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_trainer_log.deleted_on > @last_download AND DELETED_trainer_log.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'trainer_log', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."trainer_log" WHERE "account_num" = {ml r."account_num"} AND "date_of_session" = {ml r."date_of_session"} AND "time_of_session" = {ml r."time_of_session"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'trainer_log', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."trainer_log" ( "fname", "lname", "account_num", "barcode_num", "total_price", "per_session_price", "number_of_sessions", "sessions_remaining", "trainer_name", "date_of_last_session", "date_of_session", "time_of_session", "date_start", "date_end", "service_type", "client_num" ) VALUES ( {ml r."fname"}, {ml r."lname"}, {ml r."account_num"}, {ml r."barcode_num"}, {ml r."total_price"}, {ml r."per_session_price"}, {ml r."number_of_sessions"}, {ml r."sessions_remaining"}, {ml r."trainer_name"}, {ml r."date_of_last_session"}, {ml r."date_of_session"}, {ml r."time_of_session"}, {ml r."date_start"}, {ml r."date_end"}, {ml r."service_type"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'trainer_log', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."trainer_log" SET "fname" = {ml r."fname"}, "lname" = {ml r."lname"}, "barcode_num" = {ml r."barcode_num"}, "total_price" = {ml r."total_price"}, "per_session_price" = {ml r."per_session_price"}, "number_of_sessions" = {ml r."number_of_sessions"}, "sessions_remaining" = {ml r."sessions_remaining"}, "trainer_name" = {ml r."trainer_name"}, "date_of_last_session" = {ml r."date_of_last_session"}, "date_start" = {ml r."date_start"}, "date_end" = {ml r."date_end"}, "service_type" = {ml r."service_type"} WHERE "account_num" = {ml r."account_num"} AND "date_of_session" = {ml r."date_of_session"} AND "time_of_session" = {ml r."time_of_session"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'personal_trainer', 'download_cursor', 'sql', ' SELECT personal_trainer.fname, personal_trainer.lname, personal_trainer.account_num, personal_trainer.bacode_num, personal_trainer.total_price, personal_trainer.per_session_price, personal_trainer.trainer_name, personal_trainer.number_of_sessions, personal_trainer.session_remaning, personal_trainer.date_start, personal_trainer.date_end, personal_trainer.misc_notes, personal_trainer.date_of_last_session, personal_trainer.date_of_session, personal_trainer.time_of_session, personal_trainer.current_rank, personal_trainer.date_recieved, personal_trainer.test_date, personal_trainer.points, personal_trainer.point_type, personal_trainer.belt_color, personal_trainer.sessions_used, personal_trainer.client_num FROM DBA.personal_trainer personal_trainer WHERE personal_trainer.last_modified > @last_download AND ( personal_trainer.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE personal_trainer.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'personal_trainer', 'download_delete_cursor', 'sql', ' SELECT DELETED_personal_trainer.account_num, DELETED_personal_trainer.client_num FROM DBA.DELETED_personal_trainer DELETED_personal_trainer, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_personal_trainer.deleted_on > @last_download AND DELETED_personal_trainer.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'personal_trainer', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."personal_trainer" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'personal_trainer', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."personal_trainer" ( "fname", "lname", "account_num", "bacode_num", "total_price", "per_session_price", "trainer_name", "number_of_sessions", "session_remaning", "date_start", "date_end", "misc_notes", "date_of_last_session", "date_of_session", "time_of_session", "current_rank", "date_recieved", "test_date", "points", "point_type", "belt_color", "sessions_used", "client_num" ) VALUES ( {ml r."fname"}, {ml r."lname"}, {ml r."account_num"}, {ml r."bacode_num"}, {ml r."total_price"}, {ml r."per_session_price"}, {ml r."trainer_name"}, {ml r."number_of_sessions"}, {ml r."session_remaning"}, {ml r."date_start"}, {ml r."date_end"}, {ml r."misc_notes"}, {ml r."date_of_last_session"}, {ml r."date_of_session"}, {ml r."time_of_session"}, {ml r."current_rank"}, {ml r."date_recieved"}, {ml r."test_date"}, {ml r."points"}, {ml r."point_type"}, {ml r."belt_color"}, {ml r."sessions_used"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'personal_trainer', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."personal_trainer" SET "fname" = {ml r."fname"}, "lname" = {ml r."lname"}, "bacode_num" = {ml r."bacode_num"}, "total_price" = {ml r."total_price"}, "per_session_price" = {ml r."per_session_price"}, "trainer_name" = {ml r."trainer_name"}, "number_of_sessions" = {ml r."number_of_sessions"}, "session_remaning" = {ml r."session_remaning"}, "date_start" = {ml r."date_start"}, "date_end" = {ml r."date_end"}, "misc_notes" = {ml r."misc_notes"}, "date_of_last_session" = {ml r."date_of_last_session"}, "date_of_session" = {ml r."date_of_session"}, "time_of_session" = {ml r."time_of_session"}, "current_rank" = {ml r."current_rank"}, "date_recieved" = {ml r."date_recieved"}, "test_date" = {ml r."test_date"}, "points" = {ml r."points"}, "point_type" = {ml r."point_type"}, "belt_color" = {ml r."belt_color"}, "sessions_used" = {ml r."sessions_used"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_tender', 'download_cursor', 'sql', ' SELECT reg_master_tender.recipt_num, reg_master_tender.tender, reg_master_tender.amount, reg_master_tender.item_num, reg_master_tender.register_num, reg_master_tender.client_num FROM DBA.reg_master_tender reg_master_tender WHERE reg_master_tender.last_modified > @last_download AND ( reg_master_tender.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE reg_master_tender.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_tender', 'download_delete_cursor', 'sql', ' SELECT DELETED_reg_master_tender.recipt_num, DELETED_reg_master_tender.item_num, DELETED_reg_master_tender.register_num, DELETED_reg_master_tender.client_num FROM DBA.DELETED_reg_master_tender DELETED_reg_master_tender, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_reg_master_tender.deleted_on > @last_download AND DELETED_reg_master_tender.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_tender', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."reg_master_tender" WHERE "recipt_num" = {ml r."recipt_num"} AND "item_num" = {ml r."item_num"} AND "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_tender', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."reg_master_tender" ( "recipt_num", "tender", "amount", "item_num", "register_num", "client_num" ) VALUES ( {ml r."recipt_num"}, {ml r."tender"}, {ml r."amount"}, {ml r."item_num"}, {ml r."register_num"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master_tender', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."reg_master_tender" SET "tender" = {ml r."tender"}, "amount" = {ml r."amount"} WHERE "recipt_num" = {ml r."recipt_num"} AND "item_num" = {ml r."item_num"} AND "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master', 'download_cursor', 'sql', ' SELECT reg_master.recipt_num, reg_master."date", reg_master."time", reg_master.register_num, reg_master.clerk_num, reg_master.subtotal, reg_master.sales_tax, reg_master.total, reg_master.amount_paid, reg_master.change, reg_master.customer_num, reg_master.posted, reg_master.status, reg_master.pdate, reg_master.ptime, reg_master.pclerk_num, reg_master.change_flag, reg_master.returnable, reg_master.client_num FROM DBA.reg_master reg_master WHERE reg_master.last_modified > @last_download AND ( reg_master.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE reg_master.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master', 'download_delete_cursor', 'sql', ' SELECT DELETED_reg_master.recipt_num, DELETED_reg_master.register_num, DELETED_reg_master.client_num FROM DBA.DELETED_reg_master DELETED_reg_master, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_reg_master.deleted_on > @last_download AND DELETED_reg_master.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."reg_master" WHERE "recipt_num" = {ml r."recipt_num"} AND "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."reg_master" ( "recipt_num", "date", "time", "register_num", "clerk_num", "subtotal", "sales_tax", "total", "amount_paid", "change", "customer_num", "posted", "status", "pdate", "ptime", "pclerk_num", "change_flag", "returnable", "client_num" ) VALUES ( {ml r."recipt_num"}, {ml r."date"}, {ml r."time"}, {ml r."register_num"}, {ml r."clerk_num"}, {ml r."subtotal"}, {ml r."sales_tax"}, {ml r."total"}, {ml r."amount_paid"}, {ml r."change"}, {ml r."customer_num"}, {ml r."posted"}, {ml r."status"}, {ml r."pdate"}, {ml r."ptime"}, {ml r."pclerk_num"}, {ml r."change_flag"}, {ml r."returnable"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'reg_master', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."reg_master" SET "date" = {ml r."date"}, "time" = {ml r."time"}, "clerk_num" = {ml r."clerk_num"}, "subtotal" = {ml r."subtotal"}, "sales_tax" = {ml r."sales_tax"}, "total" = {ml r."total"}, "amount_paid" = {ml r."amount_paid"}, "change" = {ml r."change"}, "customer_num" = {ml r."customer_num"}, "posted" = {ml r."posted"}, "status" = {ml r."status"}, "pdate" = {ml r."pdate"}, "ptime" = {ml r."ptime"}, "pclerk_num" = {ml r."pclerk_num"}, "change_flag" = {ml r."change_flag"}, "returnable" = {ml r."returnable"} WHERE "recipt_num" = {ml r."recipt_num"} AND "register_num" = {ml r."register_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tender', 'download_cursor', 'sql', 'SELECT tender.tender_type, tender.client_num FROM DBA.tender tender WHERE tender.last_modified > @last_download AND ( tender.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE tender.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) )'); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tender', 'download_delete_cursor', 'sql', ' SELECT DELETED_tender.tender_type, DELETED_tender.client_num FROM DBA.DELETED_tender DELETED_tender, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_tender.deleted_on > @last_download AND DELETED_tender.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username'); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tender', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."tender" WHERE "tender_type" = {ml r."tender_type"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'tender', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."tender" ( "tender_type", "client_num" ) VALUES ( {ml r."tender_type"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'register', 'download_cursor', 'sql', ' SELECT register.register_num, register.register_totals, register.register_start_amount, register.register_end_amount, register.receipt_mesg_1, register.receipt_mesg_2, register.receipt_mesg_3, register.receipt_mesg_4, register.receipt_mesg_5, register.receipt_mesg_6, register.receipt_num, register.description, register.client_num FROM DBA.register register WHERE register.last_modified > @last_download AND ( register.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE register.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'register', 'download_delete_cursor', 'sql', ' SELECT DELETED_register.register_num, DELETED_register.receipt_num, DELETED_register.client_num FROM DBA.DELETED_register DELETED_register, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_register.deleted_on > @last_download AND DELETED_register.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'register', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."register" WHERE "register_num" = {ml r."register_num"} AND "receipt_num" = {ml r."receipt_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'register', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."register" ( "register_num", "register_totals", "register_start_amount", "register_end_amount", "receipt_mesg_1", "receipt_mesg_2", "receipt_mesg_3", "receipt_mesg_4", "receipt_mesg_5", "receipt_mesg_6", "receipt_num", "description", "client_num" ) VALUES ( {ml r."register_num"}, {ml r."register_totals"}, {ml r."register_start_amount"}, {ml r."register_end_amount"}, {ml r."receipt_mesg_1"}, {ml r."receipt_mesg_2"}, {ml r."receipt_mesg_3"}, {ml r."receipt_mesg_4"}, {ml r."receipt_mesg_5"}, {ml r."receipt_mesg_6"}, {ml r."receipt_num"}, {ml r."description"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'register', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."register" SET "register_totals" = {ml r."register_totals"}, "register_start_amount" = {ml r."register_start_amount"}, "register_end_amount" = {ml r."register_end_amount"}, "receipt_mesg_1" = {ml r."receipt_mesg_1"}, "receipt_mesg_2" = {ml r."receipt_mesg_2"}, "receipt_mesg_3" = {ml r."receipt_mesg_3"}, "receipt_mesg_4" = {ml r."receipt_mesg_4"}, "receipt_mesg_5" = {ml r."receipt_mesg_5"}, "receipt_mesg_6" = {ml r."receipt_mesg_6"}, "description" = {ml r."description"} WHERE "register_num" = {ml r."register_num"} AND "receipt_num" = {ml r."receipt_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory', 'download_cursor', 'sql', ' SELECT inventory.plu_num, inventory.description, inventory.cost, inventory.sell_price, inventory.qty, inventory.catagory, inventory.deparment, inventory.taxable, inventory.reorder_level, inventory.print_barcode, inventory.report_flag, inventory.vendor_code, inventory.reorder_amt, inventory.attach_name, inventory.client_num, inventory.register_num, inventory.liability, inventory.commission FROM DBA.inventory inventory WHERE inventory.last_modified > @last_download AND ( inventory.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE inventory.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory', 'download_delete_cursor', 'sql', ' SELECT DELETED_inventory.plu_num, DELETED_inventory.client_num FROM DBA.DELETED_inventory DELETED_inventory, DBA.EBCS_Clients_PC WHERE DELETED_inventory.deleted_on > @last_download AND DELETED_inventory.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."inventory" WHERE "plu_num" = {ml r."plu_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."inventory" ( "plu_num", "description", "cost", "sell_price", "qty", "catagory", "deparment", "taxable", "reorder_level", "print_barcode", "report_flag", "vendor_code", "reorder_amt", "attach_name", "client_num", "register_num", "liability", "commission" ) VALUES ( {ml r."plu_num"}, {ml r."description"}, {ml r."cost"}, {ml r."sell_price"}, {ml r."qty"}, {ml r."catagory"}, {ml r."deparment"}, {ml r."taxable"}, {ml r."reorder_level"}, {ml r."print_barcode"}, {ml r."report_flag"}, {ml r."vendor_code"}, {ml r."reorder_amt"}, {ml r."attach_name"}, {ml r."client_num"}, {ml r."register_num"}, {ml r."liability"}, {ml r."commission"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'inventory', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."inventory" SET "description" = {ml r."description"}, "cost" = {ml r."cost"}, "sell_price" = {ml r."sell_price"}, "qty" = {ml r."qty"}, "catagory" = {ml r."catagory"}, "deparment" = {ml r."deparment"}, "taxable" = {ml r."taxable"}, "reorder_level" = {ml r."reorder_level"}, "print_barcode" = {ml r."print_barcode"}, "report_flag" = {ml r."report_flag"}, "vendor_code" = {ml r."vendor_code"}, "reorder_amt" = {ml r."reorder_amt"}, "attach_name" = {ml r."attach_name"}, "register_num" = {ml r."register_num"}, "liability" = {ml r."liability"}, "commission" = {ml r."commission"} WHERE "plu_num" = {ml r."plu_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'people', 'download_cursor', 'sql', ' SELECT people.first_name, people.last_name, people.phone, people.address, people.city, people.state, people.zip, people.company_name, people.fax, people.mobile, people.company_address, people.company_state, people.company_city, people.company_zip, people.name_prefix, people.notes, people.company_phone, people.category, people.date_last_visit, people.number_of_visits, people.sales_person, people.weights, people.tanning, people.aerobics, people.day_care, people.massage, people.cardiovascular, people.childrens_fitness, people.circuit_training, people.one_on_one_instruct, people.guest_id, people.join_date, people.hit, people.miss, people.reappoint, people.reappoint_date, people.guest_stat, people.apex, people.email, people.client_num FROM DBA.people people WHERE people.last_modified > @last_download AND ( people.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE people.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'people', 'download_delete_cursor', 'sql', ' SELECT DELETED_people.guest_id, DELETED_people.client_num FROM DBA.DELETED_people DELETED_people, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_people.deleted_on > @last_download AND DELETED_people.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'people', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."people" WHERE "guest_id" = {ml r."guest_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'people', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."people" ( "first_name", "last_name", "phone", "address", "city", "state", "zip", "company_name", "fax", "mobile", "company_address", "company_state", "company_city", "company_zip", "name_prefix", "notes", "company_phone", "category", "date_last_visit", "number_of_visits", "sales_person", "weights", "tanning", "aerobics", "day_care", "massage", "cardiovascular", "childrens_fitness", "circuit_training", "one_on_one_instruct", "guest_id", "join_date", "hit", "miss", "reappoint", "reappoint_date", "guest_stat", "apex", "email", "client_num" ) VALUES ( {ml r."first_name"}, {ml r."last_name"}, {ml r."phone"}, {ml r."address"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."company_name"}, {ml r."fax"}, {ml r."mobile"}, {ml r."company_address"}, {ml r."company_state"}, {ml r."company_city"}, {ml r."company_zip"}, {ml r."name_prefix"}, {ml r."notes"}, {ml r."company_phone"}, {ml r."category"}, {ml r."date_last_visit"}, {ml r."number_of_visits"}, {ml r."sales_person"}, {ml r."weights"}, {ml r."tanning"}, {ml r."aerobics"}, {ml r."day_care"}, {ml r."massage"}, {ml r."cardiovascular"}, {ml r."childrens_fitness"}, {ml r."circuit_training"}, {ml r."one_on_one_instruct"}, {ml r."guest_id"}, {ml r."join_date"}, {ml r."hit"}, {ml r."miss"}, {ml r."reappoint"}, {ml r."reappoint_date"}, {ml r."guest_stat"}, {ml r."apex"}, {ml r."email"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'people', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."people" SET "first_name" = {ml r."first_name"}, "last_name" = {ml r."last_name"}, "phone" = {ml r."phone"}, "address" = {ml r."address"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "company_name" = {ml r."company_name"}, "fax" = {ml r."fax"}, "mobile" = {ml r."mobile"}, "company_address" = {ml r."company_address"}, "company_state" = {ml r."company_state"}, "company_city" = {ml r."company_city"}, "company_zip" = {ml r."company_zip"}, "name_prefix" = {ml r."name_prefix"}, "notes" = {ml r."notes"}, "company_phone" = {ml r."company_phone"}, "category" = {ml r."category"}, "date_last_visit" = {ml r."date_last_visit"}, "number_of_visits" = {ml r."number_of_visits"}, "sales_person" = {ml r."sales_person"}, "weights" = {ml r."weights"}, "tanning" = {ml r."tanning"}, "aerobics" = {ml r."aerobics"}, "day_care" = {ml r."day_care"}, "massage" = {ml r."massage"}, "cardiovascular" = {ml r."cardiovascular"}, "childrens_fitness" = {ml r."childrens_fitness"}, "circuit_training" = {ml r."circuit_training"}, "one_on_one_instruct" = {ml r."one_on_one_instruct"}, "join_date" = {ml r."join_date"}, "hit" = {ml r."hit"}, "miss" = {ml r."miss"}, "reappoint" = {ml r."reappoint"}, "reappoint_date" = {ml r."reappoint_date"}, "guest_stat" = {ml r."guest_stat"}, "apex" = {ml r."apex"}, "email" = {ml r."email"} WHERE "guest_id" = {ml r."guest_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'customer', 'download_cursor', 'sql', ' SELECT customer.last_name, customer.first_name, customer.mi, customer.address, customer.city, customer.state, customer.zip, customer.home_phone, customer.work_phone, customer.number_of_visits, customer.notes, customer.notes2, customer.account_num, customer.date_last_visit, customer.card_num, customer.escrow, customer.escrow_amt, customer.charge, customer.charge_limit, customer.charged_amt, customer.customer_num, customer.client_num FROM DBA.customer customer WHERE customer.last_modified > @last_download AND ( customer.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE customer.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'customer', 'download_delete_cursor', 'sql', ' SELECT DELETED_customer.account_num, DELETED_customer.client_num FROM DBA.DELETED_customer DELETED_customer, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_customer.deleted_on > @last_download AND DELETED_customer.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'customer', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."customer" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'customer', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."customer" ( "last_name", "first_name", "mi", "address", "city", "state", "zip", "home_phone", "work_phone", "number_of_visits", "notes", "notes2", "account_num", "date_last_visit", "card_num", "escrow", "escrow_amt", "charge", "charge_limit", "charged_amt", "customer_num", "client_num" ) VALUES ( {ml r."last_name"}, {ml r."first_name"}, {ml r."mi"}, {ml r."address"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."home_phone"}, {ml r."work_phone"}, {ml r."number_of_visits"}, {ml r."notes"}, {ml r."notes2"}, {ml r."account_num"}, {ml r."date_last_visit"}, {ml r."card_num"}, {ml r."escrow"}, {ml r."escrow_amt"}, {ml r."charge"}, {ml r."charge_limit"}, {ml r."charged_amt"}, {ml r."customer_num"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'customer', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."customer" SET "last_name" = {ml r."last_name"}, "first_name" = {ml r."first_name"}, "mi" = {ml r."mi"}, "address" = {ml r."address"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "home_phone" = {ml r."home_phone"}, "work_phone" = {ml r."work_phone"}, "number_of_visits" = {ml r."number_of_visits"}, "notes" = {ml r."notes"}, "notes2" = {ml r."notes2"}, "date_last_visit" = {ml r."date_last_visit"}, "card_num" = {ml r."card_num"}, "escrow" = {ml r."escrow"}, "escrow_amt" = {ml r."escrow_amt"}, "charge" = {ml r."charge"}, "charge_limit" = {ml r."charge_limit"}, "charged_amt" = {ml r."charged_amt"}, "customer_num" = {ml r."customer_num"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'checkina', 'download_cursor', 'sql', ' SELECT checkina.account_num, checkina.name, checkina.date_checked, checkina.time_checked, checkina.hour_of_day, checkina.account_status, checkina.past_due_amount, checkina.company_name, checkina.misc_event, checkina.expire_date, checkina.location_num, checkina.client_num, checkina.id_num FROM DBA.checkina checkina WHERE checkina.last_modified > @last_download AND ( checkina.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE checkina.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'checkina', 'download_delete_cursor', 'sql', ' SELECT DELETED_checkina.id_num, DELETED_checkina.client_num FROM DBA.DELETED_checkina DELETED_checkina, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_checkina.deleted_on > @last_download AND DELETED_checkina.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'checkina', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."checkina" WHERE "client_num" = {ml r."client_num"} AND "id_num" = {ml r."id_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'checkina', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."checkina" ( "account_num", "name", "date_checked", "time_checked", "hour_of_day", "account_status", "past_due_amount", "company_name", "misc_event", "expire_date", "location_num", "client_num", "id_num" ) VALUES ( {ml r."account_num"}, {ml r."name"}, {ml r."date_checked"}, {ml r."time_checked"}, {ml r."hour_of_day"}, {ml r."account_status"}, {ml r."past_due_amount"}, {ml r."company_name"}, {ml r."misc_event"}, {ml r."expire_date"}, {ml r."location_num"}, {ml r."client_num"}, {ml r."id_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'checkina', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."checkina" SET "account_num" = {ml r."account_num"}, "name" = {ml r."name"}, "date_checked" = {ml r."date_checked"}, "time_checked" = {ml r."time_checked"}, "hour_of_day" = {ml r."hour_of_day"}, "account_status" = {ml r."account_status"}, "past_due_amount" = {ml r."past_due_amount"}, "company_name" = {ml r."company_name"}, "misc_event" = {ml r."misc_event"}, "expire_date" = {ml r."expire_date"}, "location_num" = {ml r."location_num"} WHERE "client_num" = {ml r."client_num"} AND "id_num" = {ml r."id_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'notes', 'download_cursor', 'sql', ' SELECT notes.account_num, notes.date_of_note, notes.member_name, notes.subject, notes.deliver, notes.note, notes.time_of_note, notes.client_num FROM DBA.notes notes WHERE notes.last_modified > @last_download AND ( notes.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE notes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'notes', 'download_delete_cursor', 'sql', ' SELECT DELETED_notes.account_num, DELETED_notes.date_of_note, DELETED_notes.time_of_note, DELETED_notes.client_num FROM DBA.DELETED_notes DELETED_notes, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_notes.deleted_on > @last_download AND DELETED_notes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'notes', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."notes" WHERE "account_num" = {ml r."account_num"} AND "date_of_note" = {ml r."date_of_note"} AND "time_of_note" = {ml r."time_of_note"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'notes', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."notes" ( "account_num", "date_of_note", "member_name", "subject", "deliver", "note", "time_of_note", "client_num" ) VALUES ( {ml r."account_num"}, {ml r."date_of_note"}, {ml r."member_name"}, {ml r."subject"}, {ml r."deliver"}, {ml r."note"}, {ml r."time_of_note"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'notes', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."notes" SET "member_name" = {ml r."member_name"}, "subject" = {ml r."subject"}, "deliver" = {ml r."deliver"}, "note" = {ml r."note"} WHERE "account_num" = {ml r."account_num"} AND "date_of_note" = {ml r."date_of_note"} AND "time_of_note" = {ml r."time_of_note"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs', 'download_cursor', 'sql', ' SELECT ebcs.account_num, ebcs.client_num, ebcs.card_num, ebcs.joint_accont_num, ebcs.account_status, ebcs.first_name, ebcs.last_name, ebcs.mi, ebcs.generation, ebcs.street_num, ebcs.street_name, ebcs.second_line_address, ebcs.city, ebcs.state, ebcs.zip, ebcs.home_phone, ebcs.work_phone, ebcs.work_ext, ebcs.emp_name, ebcs.emp_street_num, ebcs.emp_street_name, ebcs.emp_sec_line_addr, ebcs.emp_city, ebcs.emp_state, ebcs.emp_zip, ebcs.ssn, ebcs.dob, ebcs.month_of_dob, ebcs.sex, ebcs.height, ebcs.weight, ebcs.eye_color, ebcs.hair_color, ebcs.guarantor_last_name, ebcs.guarantor_first_name, ebcs.guarantor_mi, ebcs.guarantor_address, ebcs.guarantor_cit_st_zip, ebcs.guarantor_phone_num, ebcs.guarantor_work_num, ebcs.guarantor_ssn, ebcs.name_test, ebcs.club_account, ebcs.with_another_agency, ebcs.bad_address, ebcs.bad_home_num, ebcs.bad_work_num, ebcs.name_relative, ebcs.address_relative, ebcs.phone_num_relative, ebcs.name_friend, ebcs.phone_num_friend, ebcs.source_code, ebcs.contract_date, ebcs.contract_expir_date, ebcs.name_of_contract, ebcs.term_of_contract, ebcs.cash_price_of_contract, ebcs.finance_percentage, ebcs.amount_of_finance_charge, ebcs.sales_tax_percentage, ebcs.amount_of_sales_tax, ebcs.total_of_sale, ebcs.down_payment, ebcs.financed_amount, ebcs.number_of_payments, ebcs.amount_of_payment, ebcs.remaining_num_of_payments, ebcs.total_of_all_payments, ebcs.first_payment_due_date, ebcs.next_payment_due_date, ebcs.method_of_payment, ebcs.remaining_bal_on_contract, ebcs.current_paymts_due, ebcs.deliq_1to10_day_due, ebcs.deliq_11_to30_days_due, ebcs.deliq_30to60_days_due, ebcs.deliq_61to90_days_due, ebcs.deliq_90to120_days_due, ebcs.over_120_days, ebcs.total_paymt_due, ebcs.late_fees_owed, ebcs.return_fees_owed, ebcs.service_fees_owed, ebcs.total_amt_due_now, ebcs.payoff_amt, ebcs.interest_saved, ebcs.total_payoff_amt, ebcs.method_of_last_paymt_recd, ebcs.total_amt_of_last_payment, ebcs.date_of_last_paymt, ebcs.amt_applied_to_paymts, ebcs.amt_applied_to_late_fees, ebcs.amt_applied_to_return_fees, ebcs.amt_applied_to_service_fees, ebcs.days_deliq_when_recieved, ebcs.num_of_days_late, ebcs.billing_cycle, ebcs.renewal_date, ebcs.renewal_amt, ebcs.special_charg_discript, ebcs.num_of_times_to_charge, ebcs.num_of_times_charged, ebcs.first_date_to_charge, ebcs.next_date_to_charge, ebcs.bank_name, ebcs.bank_address, ebcs.bank_city, ebcs.bank_state, ebcs.bank_zip, ebcs.routing_num, ebcs.bank_acc_num, ebcs.monthly_draft_amt, ebcs.prenote_complete, ebcs.monthly_eft_dues, ebcs.monthly_pb_dues, ebcs.mail_invoice, ebcs.credit_card_name, ebcs.credit_card_tye, ebcs.credit_card_num, ebcs.old_credit_card_num, ebcs.monthly_cc_draft, ebcs.credit_card_exprtion_date, ebcs.last_name_on_back_acct, ebcs.first_name_on_bank_acct, ebcs.mi_on_bank_acct, ebcs.last_name_on_credit_card, ebcs.first_name_on_credit_card, ebcs.mi_on_credit_card, ebcs.num_of_lat_notices_maild, ebcs.date_of_last_late_notice, ebcs.number_of_pb_mailed, ebcs.date_of_last_pb, ebcs.date_1st_renewal_mailed, ebcs.date_2nd_renewal_mailed, ebcs.late_fee_waived, ebcs.date_of_collection_letter, ebcs.return_fee_waived, ebcs.service_fee_waived, ebcs.payments_waived, ebcs.reason_for_cancel, ebcs.reactivate_date, ebcs.last_debit_date, ebcs.date_of_court_hearing, ebcs.member_since, ebcs.original_contrat_date, ebcs.rewrite_date, ebcs.total_money_paid_to_date, ebcs.fist_sale_person, ebcs.sec_sale_person, ebcs.commision, ebcs.cancel_acc_after_date, ebcs.purge_from_sys, ebcs.rewitten_by, ebcs.promise_to_pay_date, ebcs.late_fee_charge, ebcs.service_fee_charge, ebcs.return_fee_charge, ebcs.acct_created_by, ebcs.date_account_entered, ebcs.num_of_outgoin_calls, ebcs.num_of_incoming_calls, ebcs.reason_for_freeze, ebcs.effective_date_freeze, ebcs.extend_expire_date, ebcs.misc_field, ebcs.notes_line_one, ebcs.notes_line_two, ebcs.contract_on_hold, ebcs.date_status_changed, ebcs.old_account_num, ebcs.id_picture, ebcs.date_of_last_visit, ebcs.number_of_visits, ebcs.personal_trainer, ebcs.total_princ_plus_fin_due, ebcs.bacode_printed, ebcs.date_barode_printed, ebcs.num_times_barcode_printed, ebcs.date_of_return, ebcs.reason_returned, ebcs.amount_of_return, ebcs.due_date_of_return, ebcs.amt_of_special_chrg, ebcs.email_address, ebcs.club_database, ebcs.credit, ebcs.change_date, ebcs.create_date, ebcs.previous_status, ebcs.commish_paid, ebcs.night_mod_time, ebcs.map_member_ref_num, ebcs.map_num_of_credits, ebcs.map_credit_amt, ebcs.map_credit_total, ebcs.contract_type, ebcs.ebcs_status, ebcs.ebcs_status_date, ebcs.service_1_yn, ebcs.service_2_yn, ebcs.service_3_yn, ebcs.service_4_yn, ebcs.service_5_yn, ebcs.service_6_yn, ebcs.service_7_yn, ebcs.service_8_yn, ebcs.service_9_yn, ebcs.service_10_yn, ebcs.all_days_hours_yn, ebcs.monday_yn, ebcs.tuesday_yn, ebcs.wednesday_yn, ebcs.thursday_yn, ebcs.friday_yn, ebcs.saturday_yn, ebcs.sunday_yn, ebcs.monday_start_time, ebcs.monday_end_time, ebcs.tuesday_start_time, ebcs.tuesday_end_time, ebcs.wednesday_start_time, ebcs.wednesday_end_time, ebcs.thursday_start_time, ebcs.thursday_end_time, ebcs.friday_start_time, ebcs.friday_end_time, ebcs.saturday_start_time, ebcs.saturday_end_time, ebcs.sunday_start_time, ebcs.sunday_end_time, ebcs.cur_mod_number, ebcs.minor_yn, ebcs.drivers_license, ebcs.married_single, ebcs.guarantor_relationship, ebcs.guarantor_dob, ebcs.auto_renewal, ebcs.contract_edit_yn, ebcs.initiation_fee, ebcs.cash_price_edit_yn, ebcs.renewal_term, ebcs.department, ebcs.cell_phone, ebcs.relation_relative, ebcs.relation, ebcs.source_other, ebcs.referred_by, ebcs.cancel_other, ebcs.prorate_dues, ebcs.prorate_maint_fee, ebcs.maint_fee, ebcs.maint_cycle, ebcs.maint_month, ebcs.maint_day, ebcs.preenroll_yn, ebcs.sales_tax_dp, ebcs.amount_of_payment_club, ebcs.total_of_all_payments_club, ebcs.prorate_dues_club, ebcs.initiation_fee_club, ebcs.prorate_maint_fee_club, ebcs.reciprocity_yn FROM DBA.ebcs ebcs, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE ebcs.last_modified > @last_download AND (ebcs.client_num = @ml_username OR ebcs.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username AND ebcs.reciprocity_yn = ''Y'') '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs', 'download_delete_cursor', 'sql', ' SELECT DELETED_ebcs.account_num, DELETED_ebcs.client_num FROM DBA.DELETED_ebcs DELETED_ebcs, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs.deleted_on > @last_download AND DELETED_ebcs.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."ebcs" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."ebcs" ( "account_num", "client_num", "card_num", "joint_accont_num", "account_status", "first_name", "last_name", "mi", "generation", "street_num", "street_name", "second_line_address", "city", "state", "zip", "home_phone", "work_phone", "work_ext", "emp_name", "emp_street_num", "emp_street_name", "emp_sec_line_addr", "emp_city", "emp_state", "emp_zip", "ssn", "dob", "month_of_dob", "sex", "height", "weight", "eye_color", "hair_color", "guarantor_last_name", "guarantor_first_name", "guarantor_mi", "guarantor_address", "guarantor_cit_st_zip", "guarantor_phone_num", "guarantor_work_num", "guarantor_ssn", "name_test", "club_account", "with_another_agency", "bad_address", "bad_home_num", "bad_work_num", "name_relative", "address_relative", "phone_num_relative", "name_friend", "phone_num_friend", "source_code", "contract_date", "contract_expir_date", "name_of_contract", "term_of_contract", "cash_price_of_contract", "finance_percentage", "amount_of_finance_charge", "sales_tax_percentage", "amount_of_sales_tax", "total_of_sale", "down_payment", "financed_amount", "number_of_payments", "amount_of_payment", "remaining_num_of_payments", "total_of_all_payments", "first_payment_due_date", "next_payment_due_date", "method_of_payment", "remaining_bal_on_contract", "current_paymts_due", "deliq_1to10_day_due", "deliq_11_to30_days_due", "deliq_30to60_days_due", "deliq_61to90_days_due", "deliq_90to120_days_due", "over_120_days", "total_paymt_due", "late_fees_owed", "return_fees_owed", "service_fees_owed", "total_amt_due_now", "payoff_amt", "interest_saved", "total_payoff_amt", "method_of_last_paymt_recd", "total_amt_of_last_payment", "date_of_last_paymt", "amt_applied_to_paymts", "amt_applied_to_late_fees", "amt_applied_to_return_fees", "amt_applied_to_service_fees", "days_deliq_when_recieved", "num_of_days_late", "billing_cycle", "renewal_date", "renewal_amt", "special_charg_discript", "num_of_times_to_charge", "num_of_times_charged", "first_date_to_charge", "next_date_to_charge", "bank_name", "bank_address", "bank_city", "bank_state", "bank_zip", "routing_num", "bank_acc_num", "monthly_draft_amt", "prenote_complete", "monthly_eft_dues", "monthly_pb_dues", "mail_invoice", "credit_card_name", "credit_card_tye", "credit_card_num", "old_credit_card_num", "monthly_cc_draft", "credit_card_exprtion_date", "last_name_on_back_acct", "first_name_on_bank_acct", "mi_on_bank_acct", "last_name_on_credit_card", "first_name_on_credit_card", "mi_on_credit_card", "num_of_lat_notices_maild", "date_of_last_late_notice", "number_of_pb_mailed", "date_of_last_pb", "date_1st_renewal_mailed", "date_2nd_renewal_mailed", "late_fee_waived", "date_of_collection_letter", "return_fee_waived", "service_fee_waived", "payments_waived", "reason_for_cancel", "reactivate_date", "last_debit_date", "date_of_court_hearing", "member_since", "original_contrat_date", "rewrite_date", "total_money_paid_to_date", "fist_sale_person", "sec_sale_person", "commision", "cancel_acc_after_date", "purge_from_sys", "rewitten_by", "promise_to_pay_date", "late_fee_charge", "service_fee_charge", "return_fee_charge", "acct_created_by", "date_account_entered", "num_of_outgoin_calls", "num_of_incoming_calls", "reason_for_freeze", "effective_date_freeze", "extend_expire_date", "misc_field", "notes_line_one", "notes_line_two", "contract_on_hold", "date_status_changed", "old_account_num", "id_picture", "date_of_last_visit", "number_of_visits", "personal_trainer", "total_princ_plus_fin_due", "bacode_printed", "date_barode_printed", "num_times_barcode_printed", "date_of_return", "reason_returned", "amount_of_return", "due_date_of_return", "amt_of_special_chrg", "email_address", "club_database", "credit", "change_date", "create_date", "previous_status", "commish_paid", "night_mod_time", "map_member_ref_num", "map_num_of_credits", "map_credit_amt", "map_credit_total", "contract_type", "ebcs_status", "ebcs_status_date", "service_1_yn", "service_2_yn", "service_3_yn", "service_4_yn", "service_5_yn", "service_6_yn", "service_7_yn", "service_8_yn", "service_9_yn", "service_10_yn", "all_days_hours_yn", "monday_yn", "tuesday_yn", "wednesday_yn", "thursday_yn", "friday_yn", "saturday_yn", "sunday_yn", "monday_start_time", "monday_end_time", "tuesday_start_time", "tuesday_end_time", "wednesday_start_time", "wednesday_end_time", "thursday_start_time", "thursday_end_time", "friday_start_time", "friday_end_time", "saturday_start_time", "saturday_end_time", "sunday_start_time", "sunday_end_time", "cur_mod_number", "minor_yn", "drivers_license", "married_single", "guarantor_relationship", "guarantor_dob", "auto_renewal", "contract_edit_yn", "initiation_fee", "cash_price_edit_yn", "renewal_term", "department", "cell_phone", "relation_relative", "relation", "source_other", "referred_by", "cancel_other", "prorate_dues", "prorate_maint_fee", "maint_fee", "maint_cycle", "maint_month", "maint_day", "preenroll_yn", "sales_tax_DP", "amount_of_payment_club", "total_of_all_payments_club", "prorate_dues_club", "initiation_fee_club", "prorate_maint_fee_club", "reciprocity_yn" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."card_num"}, {ml r."joint_accont_num"}, {ml r."account_status"}, {ml r."first_name"}, {ml r."last_name"}, {ml r."mi"}, {ml r."generation"}, {ml r."street_num"}, {ml r."street_name"}, {ml r."second_line_address"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."home_phone"}, {ml r."work_phone"}, {ml r."work_ext"}, {ml r."emp_name"}, {ml r."emp_street_num"}, {ml r."emp_street_name"}, {ml r."emp_sec_line_addr"}, {ml r."emp_city"}, {ml r."emp_state"}, {ml r."emp_zip"}, {ml r."ssn"}, {ml r."dob"}, {ml r."month_of_dob"}, {ml r."sex"}, {ml r."height"}, {ml r."weight"}, {ml r."eye_color"}, {ml r."hair_color"}, {ml r."guarantor_last_name"}, {ml r."guarantor_first_name"}, {ml r."guarantor_mi"}, {ml r."guarantor_address"}, {ml r."guarantor_cit_st_zip"}, {ml r."guarantor_phone_num"}, {ml r."guarantor_work_num"}, {ml r."guarantor_ssn"}, {ml r."name_test"}, {ml r."club_account"}, {ml r."with_another_agency"}, {ml r."bad_address"}, {ml r."bad_home_num"}, {ml r."bad_work_num"}, {ml r."name_relative"}, {ml r."address_relative"}, {ml r."phone_num_relative"}, {ml r."name_friend"}, {ml r."phone_num_friend"}, {ml r."source_code"}, {ml r."contract_date"}, {ml r."contract_expir_date"}, {ml r."name_of_contract"}, {ml r."term_of_contract"}, {ml r."cash_price_of_contract"}, {ml r."finance_percentage"}, {ml r."amount_of_finance_charge"}, {ml r."sales_tax_percentage"}, {ml r."amount_of_sales_tax"}, {ml r."total_of_sale"}, {ml r."down_payment"}, {ml r."financed_amount"}, {ml r."number_of_payments"}, {ml r."amount_of_payment"}, {ml r."remaining_num_of_payments"}, {ml r."total_of_all_payments"}, {ml r."first_payment_due_date"}, {ml r."next_payment_due_date"}, {ml r."method_of_payment"}, {ml r."remaining_bal_on_contract"}, {ml r."current_paymts_due"}, {ml r."deliq_1to10_day_due"}, {ml r."deliq_11_to30_days_due"}, {ml r."deliq_30to60_days_due"}, {ml r."deliq_61to90_days_due"}, {ml r."deliq_90to120_days_due"}, {ml r."over_120_days"}, {ml r."total_paymt_due"}, {ml r."late_fees_owed"}, {ml r."return_fees_owed"}, {ml r."service_fees_owed"}, {ml r."total_amt_due_now"}, {ml r."payoff_amt"}, {ml r."interest_saved"}, {ml r."total_payoff_amt"}, {ml r."method_of_last_paymt_recd"}, {ml r."total_amt_of_last_payment"}, {ml r."date_of_last_paymt"}, {ml r."amt_applied_to_paymts"}, {ml r."amt_applied_to_late_fees"}, {ml r."amt_applied_to_return_fees"}, {ml r."amt_applied_to_service_fees"}, {ml r."days_deliq_when_recieved"}, {ml r."num_of_days_late"}, {ml r."billing_cycle"}, {ml r."renewal_date"}, {ml r."renewal_amt"}, {ml r."special_charg_discript"}, {ml r."num_of_times_to_charge"}, {ml r."num_of_times_charged"}, {ml r."first_date_to_charge"}, {ml r."next_date_to_charge"}, {ml r."bank_name"}, {ml r."bank_address"}, {ml r."bank_city"}, {ml r."bank_state"}, {ml r."bank_zip"}, {ml r."routing_num"}, {ml r."bank_acc_num"}, {ml r."monthly_draft_amt"}, {ml r."prenote_complete"}, {ml r."monthly_eft_dues"}, {ml r."monthly_pb_dues"}, {ml r."mail_invoice"}, {ml r."credit_card_name"}, {ml r."credit_card_tye"}, {ml r."credit_card_num"}, {ml r."old_credit_card_num"}, {ml r."monthly_cc_draft"}, {ml r."credit_card_exprtion_date"}, {ml r."last_name_on_back_acct"}, {ml r."first_name_on_bank_acct"}, {ml r."mi_on_bank_acct"}, {ml r."last_name_on_credit_card"}, {ml r."first_name_on_credit_card"}, {ml r."mi_on_credit_card"}, {ml r."num_of_lat_notices_maild"}, {ml r."date_of_last_late_notice"}, {ml r."number_of_pb_mailed"}, {ml r."date_of_last_pb"}, {ml r."date_1st_renewal_mailed"}, {ml r."date_2nd_renewal_mailed"}, {ml r."late_fee_waived"}, {ml r."date_of_collection_letter"}, {ml r."return_fee_waived"}, {ml r."service_fee_waived"}, {ml r."payments_waived"}, {ml r."reason_for_cancel"}, {ml r."reactivate_date"}, {ml r."last_debit_date"}, {ml r."date_of_court_hearing"}, {ml r."member_since"}, {ml r."original_contrat_date"}, {ml r."rewrite_date"}, {ml r."total_money_paid_to_date"}, {ml r."fist_sale_person"}, {ml r."sec_sale_person"}, {ml r."commision"}, {ml r."cancel_acc_after_date"}, {ml r."purge_from_sys"}, {ml r."rewitten_by"}, {ml r."promise_to_pay_date"}, {ml r."late_fee_charge"}, {ml r."service_fee_charge"}, {ml r."return_fee_charge"}, {ml r."acct_created_by"}, {ml r."date_account_entered"}, {ml r."num_of_outgoin_calls"}, {ml r."num_of_incoming_calls"}, {ml r."reason_for_freeze"}, {ml r."effective_date_freeze"}, {ml r."extend_expire_date"}, {ml r."misc_field"}, {ml r."notes_line_one"}, {ml r."notes_line_two"}, {ml r."contract_on_hold"}, {ml r."date_status_changed"}, {ml r."old_account_num"}, {ml r."id_picture"}, {ml r."date_of_last_visit"}, {ml r."number_of_visits"}, {ml r."personal_trainer"}, {ml r."total_princ_plus_fin_due"}, {ml r."bacode_printed"}, {ml r."date_barode_printed"}, {ml r."num_times_barcode_printed"}, {ml r."date_of_return"}, {ml r."reason_returned"}, {ml r."amount_of_return"}, {ml r."due_date_of_return"}, {ml r."amt_of_special_chrg"}, {ml r."email_address"}, {ml r."club_database"}, {ml r."credit"}, {ml r."change_date"}, {ml r."create_date"}, {ml r."previous_status"}, {ml r."commish_paid"}, {ml r."night_mod_time"}, {ml r."map_member_ref_num"}, {ml r."map_num_of_credits"}, {ml r."map_credit_amt"}, {ml r."map_credit_total"}, {ml r."contract_type"}, {ml r."ebcs_status"}, {ml r."ebcs_status_date"}, {ml r."service_1_yn"}, {ml r."service_2_yn"}, {ml r."service_3_yn"}, {ml r."service_4_yn"}, {ml r."service_5_yn"}, {ml r."service_6_yn"}, {ml r."service_7_yn"}, {ml r."service_8_yn"}, {ml r."service_9_yn"}, {ml r."service_10_yn"}, {ml r."all_days_hours_yn"}, {ml r."monday_yn"}, {ml r."tuesday_yn"}, {ml r."wednesday_yn"}, {ml r."thursday_yn"}, {ml r."friday_yn"}, {ml r."saturday_yn"}, {ml r."sunday_yn"}, {ml r."monday_start_time"}, {ml r."monday_end_time"}, {ml r."tuesday_start_time"}, {ml r."tuesday_end_time"}, {ml r."wednesday_start_time"}, {ml r."wednesday_end_time"}, {ml r."thursday_start_time"}, {ml r."thursday_end_time"}, {ml r."friday_start_time"}, {ml r."friday_end_time"}, {ml r."saturday_start_time"}, {ml r."saturday_end_time"}, {ml r."sunday_start_time"}, {ml r."sunday_end_time"}, {ml r."cur_mod_number"}, {ml r."minor_yn"}, {ml r."drivers_license"}, {ml r."married_single"}, {ml r."guarantor_relationship"}, {ml r."guarantor_dob"}, {ml r."auto_renewal"}, {ml r."contract_edit_yn"}, {ml r."initiation_fee"}, {ml r."cash_price_edit_yn"}, {ml r."renewal_term"}, {ml r."department"}, {ml r."cell_phone"}, {ml r."relation_relative"}, {ml r."relation"}, {ml r."source_other"}, {ml r."referred_by"}, {ml r."cancel_other"}, {ml r."prorate_dues"}, {ml r."prorate_maint_fee"}, {ml r."maint_fee"}, {ml r."maint_cycle"}, {ml r."maint_month"}, {ml r."maint_day"}, {ml r."preenroll_yn"}, {ml r."sales_tax_DP"}, {ml r."amount_of_payment_club"}, {ml r."total_of_all_payments_club"}, {ml r."prorate_dues_club"}, {ml r."initiation_fee_club"}, {ml r."prorate_maint_fee_club"}, {ml r."reciprocity_yn"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs', 'upload_update', 'SQL', ' /* Update the row in the consolidated database. */ CALL ml_upload_update_ebcs_v12_3 ( {ml r."card_num"}, {ml r."joint_accont_num"}, {ml r."account_status"}, {ml r."first_name"}, {ml r."last_name"}, {ml r."mi"}, {ml r."generation"}, {ml r."street_num"}, {ml r."street_name"}, {ml r."second_line_address"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."home_phone"}, {ml r."work_phone"}, {ml r."work_ext"}, {ml r."emp_name"}, {ml r."emp_street_num"}, {ml r."emp_street_name"}, {ml r."emp_sec_line_addr"}, {ml r."emp_city"}, {ml r."emp_state"}, {ml r."emp_zip"}, {ml r."ssn"}, {ml r."dob"}, {ml r."month_of_dob"}, {ml r."sex"}, {ml r."height"}, {ml r."weight"}, {ml r."eye_color"}, {ml r."hair_color"}, {ml r."guarantor_last_name"}, {ml r."guarantor_first_name"}, {ml r."guarantor_mi"}, {ml r."guarantor_address"}, {ml r."guarantor_cit_st_zip"}, {ml r."guarantor_phone_num"}, {ml r."guarantor_work_num"}, {ml r."guarantor_ssn"}, {ml r."name_test"}, {ml r."club_account"}, {ml r."with_another_agency"}, {ml r."bad_address"} , {ml r."bad_home_num"}, {ml r."bad_work_num"}, {ml r."name_relative"}, {ml r."address_relative"}, {ml r."phone_num_relative"}, {ml r."name_friend"}, {ml r."phone_num_friend"}, {ml r."source_code"}, {ml r."contract_date"}, {ml r."contract_expir_date"}, {ml r."name_of_contract"}, {ml r."term_of_contract"}, {ml r."cash_price_of_contract"}, {ml r."finance_percentage"}, {ml r."amount_of_finance_charge"}, {ml r."sales_tax_percentage"}, {ml r."amount_of_sales_tax"}, {ml r."total_of_sale"}, {ml r."down_payment"}, {ml r."financed_amount"}, {ml r."number_of_payments"}, {ml r."amount_of_payment"}, {ml r."remaining_num_of_payments"}, {ml r."total_of_all_payments"}, {ml r."first_payment_due_date"}, {ml r."next_payment_due_date"}, {ml r."method_of_payment"}, {ml r."remaining_bal_on_contract"}, {ml r."current_paymts_due"}, {ml r."deliq_1to10_day_due"}, {ml r."deliq_11_to30_days_due"}, {ml r."deliq_30to60_days_due"}, {ml r."deliq_61to90_days_due"}, {ml r."deliq_90to120_days_due"}, {ml r."over_120_days"}, {ml r."total_paymt_due"}, {ml r."late_fees_owed"}, {ml r."return_fees_owed"}, {ml r."service_fees_owed"}, {ml r."total_amt_due_now"}, {ml r."payoff_amt"}, {ml r."interest_saved"}, {ml r."total_payoff_amt"}, {ml r."method_of_last_paymt_recd"}, {ml r."total_amt_of_last_payment"}, {ml r."date_of_last_paymt"}, {ml r."amt_applied_to_paymts"}, {ml r."amt_applied_to_late_fees"}, {ml r."amt_applied_to_return_fees"}, {ml r."amt_applied_to_service_fees"}, {ml r."days_deliq_when_recieved"}, {ml r."num_of_days_late"}, {ml r."billing_cycle"}, {ml r."renewal_date"}, {ml r."renewal_amt"}, {ml r."special_charg_discript"}, {ml r."num_of_times_to_charge"}, {ml r."num_of_times_charged"}, {ml r."first_date_to_charge"}, {ml r."next_date_to_charge"}, {ml r."bank_name"}, {ml r."bank_address"}, {ml r."bank_city"}, {ml r."bank_state"}, {ml r."bank_zip"}, {ml r."routing_num"}, {ml r."bank_acc_num"}, {ml r."monthly_draft_amt"}, {ml r."prenote_complete"}, {ml r."monthly_eft_dues"}, {ml r."monthly_pb_dues"}, {ml r."mail_invoice"}, {ml r."credit_card_name"}, {ml r."credit_card_tye"}, {ml r."credit_card_num"}, {ml r."old_credit_card_num"}, {ml r."monthly_cc_draft"}, {ml r."credit_card_exprtion_date"}, {ml r."last_name_on_back_acct"}, {ml r."first_name_on_bank_acct"}, {ml r."mi_on_bank_acct"}, {ml r."last_name_on_credit_card"}, {ml r."first_name_on_credit_card"}, {ml r."mi_on_credit_card"}, {ml r."num_of_lat_notices_maild"}, {ml r."date_of_last_late_notice"}, {ml r."number_of_pb_mailed"}, {ml r."date_of_last_pb"}, {ml r."date_1st_renewal_mailed"}, {ml r."date_2nd_renewal_mailed"}, {ml r."late_fee_waived"}, {ml r."date_of_collection_letter"}, {ml r."return_fee_waived"}, {ml r."service_fee_waived"}, {ml r."payments_waived"}, {ml r."reason_for_cancel"}, {ml r."reactivate_date"}, {ml r."last_debit_date"}, {ml r."date_of_court_hearing"}, {ml r."member_since"}, {ml r."original_contrat_date"}, {ml r."rewrite_date"}, {ml r."total_money_paid_to_date"}, {ml r."fist_sale_person"}, {ml r."sec_sale_person"}, {ml r."commision"}, {ml r."cancel_acc_after_date"}, {ml r."purge_from_sys"}, {ml r."rewitten_by"}, {ml r."promise_to_pay_date"}, {ml r."late_fee_charge"}, {ml r."service_fee_charge"}, {ml r."return_fee_charge"}, {ml r."acct_created_by"}, {ml r."date_account_entered"}, {ml r."num_of_outgoin_calls"}, {ml r."num_of_incoming_calls"}, {ml r."reason_for_freeze"}, {ml r."effective_date_freeze"}, {ml r."extend_expire_date"}, {ml r."misc_field"}, {ml r."notes_line_one"}, {ml r."notes_line_two"}, {ml r."contract_on_hold"}, {ml r."date_status_changed"}, {ml r."old_account_num"}, {ml r."id_picture"}, {ml r."date_of_last_visit"}, {ml r."number_of_visits"}, {ml r."personal_trainer"}, {ml r."total_princ_plus_fin_due"}, {ml r."bacode_printed"}, {ml r."date_barode_printed"}, {ml r."num_times_barcode_printed"}, {ml r."date_of_return"}, {ml r."reason_returned"}, {ml r."amount_of_return"}, {ml r."due_date_of_return"}, {ml r."amt_of_special_chrg"}, {ml r."email_address"}, {ml r."club_database"}, {ml r."credit"}, {ml r."change_date"}, {ml r."create_date"}, {ml r."previous_status"}, {ml r."commish_paid"}, {ml r."night_mod_time"}, {ml r."map_member_ref_num"}, {ml r."map_num_of_credits"}, {ml r."map_credit_amt"}, {ml r."map_credit_total"}, {ml r."contract_type"}, {ml r."ebcs_status"}, {ml r."ebcs_status_date"}, {ml r."service_1_yn"}, {ml r."service_2_yn"}, {ml r."service_3_yn"}, {ml r."service_4_yn"}, {ml r."service_5_yn"}, {ml r."service_6_yn"}, {ml r."service_7_yn"}, {ml r."service_8_yn"}, {ml r."service_9_yn"}, {ml r."service_10_yn"}, {ml r."all_days_hours_yn"}, {ml r."monday_yn"}, {ml r."tuesday_yn"}, {ml r."wednesday_yn"}, {ml r."thursday_yn"}, {ml r."friday_yn"}, {ml r."saturday_yn"}, {ml r."sunday_yn"}, {ml r."monday_start_time"}, {ml r."monday_end_time"}, {ml r."tuesday_start_time"}, {ml r."tuesday_end_time"}, {ml r."wednesday_start_time"}, {ml r."wednesday_end_time"}, {ml r."thursday_start_time"}, {ml r."thursday_end_time"}, {ml r."friday_start_time"}, {ml r."friday_end_time"}, {ml r."saturday_start_time"}, {ml r."saturday_end_time"}, {ml r."sunday_start_time"}, {ml r."sunday_end_time"}, {ml r."cur_mod_number"}, {ml r."minor_yn"}, {ml r."drivers_license"}, {ml r."married_single"}, {ml r."guarantor_relationship"}, {ml r."guarantor_dob"}, {ml r."auto_renewal"}, {ml r."contract_edit_yn"}, {ml r."initiation_fee"}, {ml r."cash_price_edit_yn"}, {ml r."renewal_term"}, {ml r."department"}, {ml r."cell_phone"}, {ml r."relation_relative"}, {ml r."relation"}, {ml r."source_other"}, {ml r."referred_by"}, {ml r."cancel_other"}, {ml r."prorate_dues"}, {ml r."prorate_maint_fee"}, {ml r."maint_fee"}, {ml r."maint_cycle"}, {ml r."maint_month"}, {ml r."maint_day"}, {ml r."preenroll_yn"}, {ml r."sales_tax_DP"}, {ml r."amount_of_payment_club"}, {ml r."total_of_all_payments_club"}, {ml r."prorate_dues_club"}, {ml r."initiation_fee_club"}, {ml r."prorate_maint_fee_club"}, {ml r."reciprocity_yn"}, {ml r."account_num"}, {ml r."client_num"}, {ml o."card_num"}, {ml o."joint_accont_num"}, {ml o."account_status"}, {ml o."first_name"}, {ml o."last_name"}, {ml o."mi"}, {ml o."generation"}, {ml o."street_num"}, {ml o."street_name"}, {ml o."second_line_address"}, {ml o."city"}, {ml o."state"}, {ml o."zip"}, {ml o."home_phone"}, {ml o."work_phone"}, {ml o."work_ext"}, {ml o."emp_name"}, {ml o."emp_street_num"}, {ml o."emp_street_name"}, {ml o."emp_sec_line_addr"}, {ml o."emp_city"}, {ml o."emp_state"}, {ml o."emp_zip"}, {ml o."ssn"}, {ml o."dob"}, {ml o."month_of_dob"}, {ml o."sex"}, {ml o."height"}, {ml o."weight"}, {ml o."eye_color"}, {ml o."hair_color"}, {ml o."guarantor_last_name"}, {ml o."guarantor_first_name"}, {ml o."guarantor_mi"}, {ml o."guarantor_address"}, {ml o."guarantor_cit_st_zip"}, {ml o."guarantor_phone_num"}, {ml o."guarantor_work_num"}, {ml o."guarantor_ssn"}, {ml o."name_test"}, {ml o."club_account"}, {ml o."with_another_agency"}, {ml o."bad_address"} , {ml o."bad_home_num"}, {ml o."bad_work_num"}, {ml o."name_relative"}, {ml o."address_relative"}, {ml o."phone_num_relative"}, {ml o."name_friend"}, {ml o."phone_num_friend"}, {ml o."source_code"}, {ml o."contract_date"}, {ml o."contract_expir_date"}, {ml o."name_of_contract"}, {ml o."term_of_contract"}, {ml o."cash_price_of_contract"}, {ml o."finance_percentage"}, {ml o."amount_of_finance_charge"}, {ml o."sales_tax_percentage"}, {ml o."amount_of_sales_tax"}, {ml o."total_of_sale"}, {ml o."down_payment"}, {ml o."financed_amount"}, {ml o."number_of_payments"}, {ml o."amount_of_payment"}, {ml o."remaining_num_of_payments"}, {ml o."total_of_all_payments"}, {ml o."first_payment_due_date"}, {ml o."next_payment_due_date"}, {ml o."method_of_payment"}, {ml o."remaining_bal_on_contract"}, {ml o."current_paymts_due"}, {ml o."deliq_1to10_day_due"}, {ml o."deliq_11_to30_days_due"}, {ml o."deliq_30to60_days_due"}, {ml o."deliq_61to90_days_due"}, {ml o."deliq_90to120_days_due"}, {ml o."over_120_days"}, {ml o."total_paymt_due"}, {ml o."late_fees_owed"}, {ml o."return_fees_owed"}, {ml o."service_fees_owed"}, {ml o."total_amt_due_now"}, {ml o."payoff_amt"}, {ml o."interest_saved"}, {ml o."total_payoff_amt"}, {ml o."method_of_last_paymt_recd"}, {ml o."total_amt_of_last_payment"}, {ml o."date_of_last_paymt"}, {ml o."amt_applied_to_paymts"}, {ml o."amt_applied_to_late_fees"}, {ml o."amt_applied_to_return_fees"}, {ml o."amt_applied_to_service_fees"}, {ml o."days_deliq_when_recieved"}, {ml o."num_of_days_late"}, {ml o."billing_cycle"}, {ml o."renewal_date"}, {ml o."renewal_amt"}, {ml o."special_charg_discript"}, {ml o."num_of_times_to_charge"}, {ml o."num_of_times_charged"}, {ml o."first_date_to_charge"}, {ml o."next_date_to_charge"}, {ml o."bank_name"}, {ml o."bank_address"}, {ml o."bank_city"}, {ml o."bank_state"}, {ml o."bank_zip"}, {ml o."routing_num"}, {ml o."bank_acc_num"}, {ml o."monthly_draft_amt"}, {ml o."prenote_complete"}, {ml o."monthly_eft_dues"}, {ml o."monthly_pb_dues"}, {ml o."mail_invoice"}, {ml o."credit_card_name"}, {ml o."credit_card_tye"}, {ml o."credit_card_num"}, {ml o."old_credit_card_num"}, {ml o."monthly_cc_draft"}, {ml o."credit_card_exprtion_date"}, {ml o."last_name_on_back_acct"}, {ml o."first_name_on_bank_acct"}, {ml o."mi_on_bank_acct"}, {ml o."last_name_on_credit_card"}, {ml o."first_name_on_credit_card"}, {ml o."mi_on_credit_card"}, {ml o."num_of_lat_notices_maild"}, {ml o."date_of_last_late_notice"}, {ml o."number_of_pb_mailed"}, {ml o."date_of_last_pb"}, {ml o."date_1st_renewal_mailed"}, {ml o."date_2nd_renewal_mailed"}, {ml o."late_fee_waived"}, {ml o."date_of_collection_letter"}, {ml o."return_fee_waived"}, {ml o."service_fee_waived"}, {ml o."payments_waived"}, {ml o."reason_for_cancel"}, {ml o."reactivate_date"}, {ml o."last_debit_date"}, {ml o."date_of_court_hearing"}, {ml o."member_since"}, {ml o."original_contrat_date"}, {ml o."rewrite_date"}, {ml o."total_money_paid_to_date"}, {ml o."fist_sale_person"}, {ml o."sec_sale_person"}, {ml o."commision"}, {ml o."cancel_acc_after_date"}, {ml o."purge_from_sys"}, {ml o."rewitten_by"}, {ml o."promise_to_pay_date"}, {ml o."late_fee_charge"}, {ml o."service_fee_charge"}, {ml o."return_fee_charge"}, {ml o."acct_created_by"}, {ml o."date_account_entered"}, {ml o."num_of_outgoin_calls"}, {ml o."num_of_incoming_calls"}, {ml o."reason_for_freeze"}, {ml o."effective_date_freeze"}, {ml o."extend_expire_date"}, {ml o."misc_field"}, {ml o."notes_line_one"}, {ml o."notes_line_two"}, {ml o."contract_on_hold"}, {ml o."date_status_changed"}, {ml o."old_account_num"}, {ml o."id_picture"}, {ml o."date_of_last_visit"}, {ml o."number_of_visits"}, {ml o."personal_trainer"}, {ml o."total_princ_plus_fin_due"}, {ml o."bacode_printed"}, {ml o."date_barode_printed"}, {ml o."num_times_barcode_printed"}, {ml o."date_of_return"}, {ml o."reason_returned"}, {ml o."amount_of_return"}, {ml o."due_date_of_return"}, {ml o."amt_of_special_chrg"}, {ml o."email_address"}, {ml o."club_database"}, {ml o."credit"}, {ml o."change_date"}, {ml o."create_date"}, {ml o."previous_status"}, {ml o."commish_paid"}, {ml o."night_mod_time"}, {ml o."map_member_ref_num"}, {ml o."map_num_of_credits"}, {ml o."map_credit_amt"}, {ml o."map_credit_total"}, {ml o."contract_type"}, {ml o."ebcs_status"}, {ml o."ebcs_status_date"}, {ml o."service_1_yn"}, {ml o."service_2_yn"}, {ml o."service_3_yn"}, {ml o."service_4_yn"}, {ml o."service_5_yn"}, {ml o."service_6_yn"}, {ml o."service_7_yn"}, {ml o."service_8_yn"}, {ml o."service_9_yn"}, {ml o."service_10_yn"}, {ml o."all_days_hours_yn"}, {ml o."monday_yn"}, {ml o."tuesday_yn"}, {ml o."wednesday_yn"}, {ml o."thursday_yn"}, {ml o."friday_yn"}, {ml o."saturday_yn"}, {ml o."sunday_yn"}, {ml o."monday_start_time"}, {ml o."monday_end_time"}, {ml o."tuesday_start_time"}, {ml o."tuesday_end_time"}, {ml o."wednesday_start_time"}, {ml o."wednesday_end_time"}, {ml o."thursday_start_time"}, {ml o."thursday_end_time"}, {ml o."friday_start_time"}, {ml o."friday_end_time"}, {ml o."saturday_start_time"}, {ml o."saturday_end_time"}, {ml o."sunday_start_time"}, {ml o."sunday_end_time"}, {ml o."cur_mod_number"}, {ml o."minor_yn"}, {ml o."drivers_license"}, {ml o."married_single"}, {ml o."guarantor_relationship"}, {ml o."guarantor_dob"}, {ml o."auto_renewal"}, {ml o."contract_edit_yn"}, {ml o."initiation_fee"}, {ml o."cash_price_edit_yn"}, {ml o."renewal_term"}, {ml o."department"}, {ml o."cell_phone"}, {ml o."relation_relative"}, {ml o."relation"}, {ml o."source_other"}, {ml o."referred_by"}, {ml o."cancel_other"}, {ml o."prorate_dues"}, {ml o."prorate_maint_fee"}, {ml o."maint_fee"}, {ml o."maint_cycle"}, {ml o."maint_month"}, {ml o."maint_day"}, {ml o."preenroll_yn"}, {ml o."sales_tax_DP"}, {ml o."amount_of_payment_club"}, {ml o."total_of_all_payments_club"}, {ml o."prorate_dues_club"}, {ml o."initiation_fee_club"}, {ml o."prorate_maint_fee_club"}, {ml o."reciprocity_yn"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'password', 'download_cursor', 'sql', ' SELECT password.manager_number, password.client_num FROM DBA.password password WHERE password.last_modified > @last_download AND ( password.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE password.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'password', 'download_delete_cursor', 'sql', ' SELECT DELETED_password.manager_number, DELETED_password.client_num FROM DBA.DELETED_password DELETED_password, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_password.deleted_on > @last_download AND DELETED_password.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'password', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."password" WHERE "manager_number" = {ml r."manager_number"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'password', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."password" ( "manager_number", "client_num" ) ON EXISTING SKIP VALUES ( {ml r."manager_number"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'stgcntrc', 'download_cursor', 'sql', 'SELECT stgcntrc.company_name, stgcntrc.company_address, stgcntrc.company_city, stgcntrc.company_state, stgcntrc.company_zip, stgcntrc.company_county, stgcntrc.date_in_club, stgcntrc.number_in_club, stgcntrc.next_invoice_number, stgcntrc.next_voucher_number, stgcntrc.next_order_number, stgcntrc.welcome_message, stgcntrc.print_disposition, stgcntrc.print_to_screen_printer, stgcntrc.start_date_to_print, stgcntrc.end_date_to_print, stgcntrc.start_member_to_print, stgcntrc.end_member_to_print, stgcntrc.total_number_of_records, stgcntrc.sales_tax_rate, stgcntrc.annual_percentage_rate, stgcntrc.total_sales_tax, stgcntrc.facility_number, stgcntrc.phone_num, stgcntrc.fax_num, stgcntrc.e_mail, stgcntrc.check_in_time_delay, stgcntrc.bank_name, stgcntrc.branch, stgcntrc.bank_phone_num, stgcntrc.routing_num, stgcntrc.bank_account_num, stgcntrc.co_fed_id_num, stgcntrc.company_trade_name, stgcntrc.starting_barcode_num, stgcntrc.last_update, stgcntrc.time_update, stgcntrc.time_update3, stgcntrc.custom_code, stgcntrc.stop_amt, stgcntrc.location_num, stgcntrc.next_invoice_num, stgcntrc.days_late_stop, stgcntrc.deliq_stop_amt, stgcntrc.invoice_message_one, stgcntrc.invoice_message_two, stgcntrc.change_date, stgcntrc.create_date, stgcntrc.port_type, stgcntrc.statement_date, stgcntrc.due_date, stgcntrc.night_mod_time, stgcntrc.night_time_delay, stgcntrc.night_mod_end_time, stgcntrc.age_limit, stgcntrc.day_change, stgcntrc.deliq_late_stop, stgcntrc.control_code FROM DBA.stgcntrc stgcntrc WHERE stgcntrc.last_modified > 20500101 AND ( stgcntrc.facility_number = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE stgcntrc.facility_number = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) )'); call ml_admin.ml_add_lang_table_script( 'v12_3', 'stgcntrc', 'download_delete_cursor', 'sql', ' SELECT DELETED_stgcntrc.facility_number FROM DBA.DELETED_stgcntrc DELETED_stgcntrc, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_stgcntrc.deleted_on > @last_download AND DELETED_stgcntrc.facility_number = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'stgcntrc', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."stgcntrc" WHERE "facility_number" = {ml r."facility_number"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'stgcntrc', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."stgcntrc" ( "company_name", "company_address", "company_city", "company_state", "company_zip", "company_county", "date_in_club", "number_in_club", "next_invoice_number", "next_voucher_number", "next_order_number", "welcome_message", "print_disposition", "print_to_screen_printer", "start_date_to_print", "end_date_to_print", "start_member_to_print", "end_member_to_print", "total_number_of_records", "sales_tax_rate", "annual_percentage_rate", "total_sales_tax", "facility_number", "phone_num", "fax_num", "e_mail", "check_in_time_delay", "bank_name", "branch", "bank_phone_num", "routing_num", "bank_account_num", "co_fed_id_num", "company_trade_name", "starting_barcode_num", "last_update", "time_update", "time_update3", "custom_code", "stop_amt", "location_num", "next_invoice_num", "days_late_stop", "deliq_stop_amt", "invoice_message_one", "invoice_message_two", "change_date", "create_date", "port_type", "statement_date", "due_date", "night_mod_time", "night_time_delay", "night_mod_end_time", "age_limit", "day_change", "deliq_late_stop", "control_code" ) VALUES ( {ml r."company_name"}, {ml r."company_address"}, {ml r."company_city"}, {ml r."company_state"}, {ml r."company_zip"}, {ml r."company_county"}, {ml r."date_in_club"}, {ml r."number_in_club"}, {ml r."next_invoice_number"}, {ml r."next_voucher_number"}, {ml r."next_order_number"}, {ml r."welcome_message"}, {ml r."print_disposition"}, {ml r."print_to_screen_printer"}, {ml r."start_date_to_print"}, {ml r."end_date_to_print"}, {ml r."start_member_to_print"}, {ml r."end_member_to_print"}, {ml r."total_number_of_records"}, {ml r."sales_tax_rate"}, {ml r."annual_percentage_rate"}, {ml r."total_sales_tax"}, {ml r."facility_number"}, {ml r."phone_num"}, {ml r."fax_num"}, {ml r."e_mail"}, {ml r."check_in_time_delay"}, {ml r."bank_name"}, {ml r."branch"}, {ml r."bank_phone_num"}, {ml r."routing_num"}, {ml r."bank_account_num"}, {ml r."co_fed_id_num"}, {ml r."company_trade_name"}, {ml r."starting_barcode_num"}, {ml r."last_update"}, {ml r."time_update"}, {ml r."time_update3"}, {ml r."custom_code"}, {ml r."stop_amt"}, {ml r."location_num"}, {ml r."next_invoice_num"}, {ml r."days_late_stop"}, {ml r."deliq_stop_amt"}, {ml r."invoice_message_one"}, {ml r."invoice_message_two"}, {ml r."change_date"}, {ml r."create_date"}, {ml r."port_type"}, {ml r."statement_date"}, {ml r."due_date"}, {ml r."night_mod_time"}, {ml r."night_time_delay"}, {ml r."night_mod_end_time"}, {ml r."age_limit"}, {ml r."day_change"}, {ml r."deliq_late_stop"}, {ml r."control_code"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'stgcntrc', 'upload_update', 'sql', 'UPDATE "DBA"."stgcntrc" SET "company_name" = {ml r."company_name"}, "company_address" = {ml r."company_address"}, "company_city" = {ml r."company_city"}, "company_state" = {ml r."company_state"}, "company_zip" = {ml r."company_zip"}, "company_county" = {ml r."company_county"}, "date_in_club" = {ml r."date_in_club"}, "number_in_club" = {ml r."number_in_club"}, "next_invoice_number" = {ml r."next_invoice_number"}, "next_voucher_number" = {ml r."next_voucher_number"}, "next_order_number" = {ml r."next_order_number"}, "welcome_message" = {ml r."welcome_message"}, "print_disposition" = {ml r."print_disposition"}, "print_to_screen_printer" = {ml r."print_to_screen_printer"}, "start_date_to_print" = {ml r."start_date_to_print"}, "end_date_to_print" = {ml r."end_date_to_print"}, "start_member_to_print" = {ml r."start_member_to_print"}, "end_member_to_print" = {ml r."end_member_to_print"}, "total_number_of_records" = {ml r."total_number_of_records"}, "sales_tax_rate" = {ml r."sales_tax_rate"}, "annual_percentage_rate" = {ml r."annual_percentage_rate"}, "total_sales_tax" = {ml r."total_sales_tax"}, "phone_num" = {ml r."phone_num"}, "fax_num" = {ml r."fax_num"}, "e_mail" = {ml r."e_mail"}, "check_in_time_delay" = {ml r."check_in_time_delay"}, "bank_name" = {ml r."bank_name"}, "branch" = {ml r."branch"}, "bank_phone_num" = {ml r."bank_phone_num"}, "routing_num" = {ml r."routing_num"}, "bank_account_num" = {ml r."bank_account_num"}, "co_fed_id_num" = {ml r."co_fed_id_num"}, "company_trade_name" = {ml r."company_trade_name"}, "starting_barcode_num" = {ml r."starting_barcode_num"}, "last_update" = {ml r."last_update"}, "time_update" = {ml r."time_update"}, "time_update3" = {ml r."time_update3"}, "custom_code" = {ml r."custom_code"}, "stop_amt" = {ml r."stop_amt"}, "location_num" = {ml r."location_num"}, "next_invoice_num" = {ml r."next_invoice_num"}, "days_late_stop" = {ml r."days_late_stop"}, "deliq_stop_amt" = {ml r."deliq_stop_amt"}, "invoice_message_one" = {ml r."invoice_message_one"}, "invoice_message_two" = {ml r."invoice_message_two"}, "change_date" = {ml r."change_date"}, "create_date" = {ml r."create_date"}, "port_type" = {ml r."port_type"}, "statement_date" = {ml r."statement_date"}, "due_date" = {ml r."due_date"}, "night_mod_time" = {ml r."night_mod_time"}, "night_time_delay" = {ml r."night_time_delay"}, "night_mod_end_time" = {ml r."night_mod_end_time"}, "age_limit" = {ml r."age_limit"}, "day_change" = {ml r."day_change"}, "deliq_late_stop" = {ml r."deliq_late_stop"}, "control_code" = {ml r."control_code"} WHERE "facility_number" = {ml r."facility_number"}'); call ml_admin.ml_add_lang_table_script( 'v12_3', 'states', 'download_cursor', 'sql', ' SELECT states.state_id, states.state_name, states.country FROM DBA.states states WHERE states.last_modified > @last_download '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'zipcodes', 'download_cursor', 'sql', ' SELECT zipcodes.id_num, zipcodes.zipcode, zipcodes.city, zipcodes.state FROM DBA.zipcodes zipcodes WHERE zipcodes.last_modified > @last_download '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_exceptions', 'download_cursor', 'sql', ' SELECT class_exceptions.class_id, class_exceptions.date_of_excp, class_exceptions.cancelled, class_exceptions.new_room, class_exceptions.new_instructor, class_exceptions.new_date, class_exceptions.new_time, class_exceptions.information, class_exceptions.date_envoked, class_exceptions.authorizer, class_exceptions.client_num FROM DBA.class_exceptions class_exceptions WHERE class_exceptions.last_modified > @last_download AND ( class_exceptions.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE class_exceptions.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_exceptions', 'download_delete_cursor', 'sql', ' SELECT DELETED_class_exceptions.class_id, DELETED_class_exceptions.date_of_excp, DELETED_class_exceptions.client_num FROM DBA.DELETED_class_exceptions DELETED_class_exceptions, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_class_exceptions.deleted_on > @last_download AND DELETED_class_exceptions.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_exceptions', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."class_exceptions" WHERE "class_id" = {ml r."class_id"} AND "date_of_excp" = {ml r."date_of_excp"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_exceptions', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."class_exceptions" ( "class_id", "date_of_excp", "cancelled", "new_room", "new_instructor", "new_date", "new_time", "information", "date_envoked", "authorizer", "client_num" ) VALUES ( {ml r."class_id"}, {ml r."date_of_excp"}, {ml r."cancelled"}, {ml r."new_room"}, {ml r."new_instructor"}, {ml r."new_date"}, {ml r."new_time"}, {ml r."information"}, {ml r."date_envoked"}, {ml r."authorizer"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_exceptions', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."class_exceptions" SET "cancelled" = {ml r."cancelled"}, "new_room" = {ml r."new_room"}, "new_instructor" = {ml r."new_instructor"}, "new_date" = {ml r."new_date"}, "new_time" = {ml r."new_time"}, "information" = {ml r."information"}, "date_envoked" = {ml r."date_envoked"}, "authorizer" = {ml r."authorizer"} WHERE "class_id" = {ml r."class_id"} AND "date_of_excp" = {ml r."date_of_excp"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_list', 'download_cursor', 'sql', ' SELECT class_list.class_id, class_list.class_name, class_list.sun, class_list.mon, class_list.tue, class_list.wed, class_list.thu, class_list.fri, class_list.sat, class_list.date_start, class_list.date_end, class_list.time_start, class_list.time_end, class_list.room, class_list.min_level, class_list.max_level, class_list.num_enrolled, class_list.active, class_list.instructor, class_list.fee, class_list.enrolable, class_list.date_added, class_list.date_removed, class_list.client_num, class_list.tax_code, class_list.department, class_list.sub_type, class_list.age_range, class_list.notes, class_list.class_description FROM DBA.class_list class_list WHERE class_list.last_modified > @last_download AND ( class_list.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE class_list.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_list', 'download_delete_cursor', 'sql', ' SELECT DELETED_class_list.class_id, DELETED_class_list.client_num FROM DBA.DELETED_class_list DELETED_class_list, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_class_list.deleted_on > @last_download AND DELETED_class_list.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_list', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."class_list" WHERE "class_id" = {ml r."class_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_list', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."class_list" ( "class_id", "class_name", "sun", "mon", "tue", "wed", "thu", "fri", "sat", "date_start", "date_end", "time_start", "time_end", "room", "min_level", "max_level", "num_enrolled", "active", "instructor", "fee", "enrolable", "date_added", "date_removed", "client_num", "tax_code", "department", "sub_type", "age_range", "notes", "class_description" ) VALUES ( {ml r."class_id"}, {ml r."class_name"}, {ml r."sun"}, {ml r."mon"}, {ml r."tue"}, {ml r."wed"}, {ml r."thu"}, {ml r."fri"}, {ml r."sat"}, {ml r."date_start"}, {ml r."date_end"}, {ml r."time_start"}, {ml r."time_end"}, {ml r."room"}, {ml r."min_level"}, {ml r."max_level"}, {ml r."num_enrolled"}, {ml r."active"}, {ml r."instructor"}, {ml r."fee"}, {ml r."enrolable"}, {ml r."date_added"}, {ml r."date_removed"}, {ml r."client_num"}, {ml r."tax_code"}, {ml r."department"}, {ml r."sub_type"}, {ml r."age_range"}, {ml r."notes"}, {ml r."class_description"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'class_list', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."class_list" SET "class_name" = {ml r."class_name"}, "sun" = {ml r."sun"}, "mon" = {ml r."mon"}, "tue" = {ml r."tue"}, "wed" = {ml r."wed"}, "thu" = {ml r."thu"}, "fri" = {ml r."fri"}, "sat" = {ml r."sat"}, "date_start" = {ml r."date_start"}, "date_end" = {ml r."date_end"}, "time_start" = {ml r."time_start"}, "time_end" = {ml r."time_end"}, "room" = {ml r."room"}, "min_level" = {ml r."min_level"}, "max_level" = {ml r."max_level"}, "num_enrolled" = {ml r."num_enrolled"}, "active" = {ml r."active"}, "instructor" = {ml r."instructor"}, "fee" = {ml r."fee"}, "enrolable" = {ml r."enrolable"}, "date_added" = {ml r."date_added"}, "date_removed" = {ml r."date_removed"}, "tax_code" = {ml r."tax_code"}, "department" = {ml r."department"}, "sub_type" = {ml r."sub_type"}, "age_range" = {ml r."age_range"}, "notes" = {ml r."notes"}, "class_description" = {ml r."class_description"} WHERE "class_id" = {ml r."class_id"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'commission', 'download_cursor', 'sql', ' SELECT commission.client_num, commission.account_num, commission.receipt_num, commission.employee_num, commission.clerk_num, commission.register_num, commission.commission_date, commission.commission_time, commission.plu_num, commission.description, commission.catagory, commission.department, commission.qty, commission.amount, commission.tender_type, commission.commission_paid FROM DBA.commission commission WHERE commission.last_modified > @last_download AND ( commission.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE commission.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'commission', 'download_delete_cursor', 'sql', ' SELECT DELETED_commission.client_num, DELETED_commission.receipt_num, DELETED_commission.employee_num, DELETED_commission.plu_num FROM DBA.DELETED_commission DELETED_commission, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_commission.deleted_on > @last_download AND DELETED_commission.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'commission', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."commission" WHERE "client_num" = {ml r."client_num"} AND "receipt_num" = {ml r."receipt_num"} AND "employee_num" = {ml r."employee_num"} AND "plu_num" = {ml r."plu_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'commission', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."commission" ( "client_num", "account_num", "receipt_num", "employee_num", "clerk_num", "register_num", "commission_date", "commission_time", "plu_num", "description", "catagory", "department", "qty", "amount", "tender_type", "commission_paid" ) VALUES ( {ml r."client_num"}, {ml r."account_num"}, {ml r."receipt_num"}, {ml r."employee_num"}, {ml r."clerk_num"}, {ml r."register_num"}, {ml r."commission_date"}, {ml r."commission_time"}, {ml r."plu_num"}, {ml r."description"}, {ml r."catagory"}, {ml r."department"}, {ml r."qty"}, {ml r."amount"}, {ml r."tender_type"}, {ml r."commission_paid"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'commission', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."commission" SET "account_num" = {ml r."account_num"}, "clerk_num" = {ml r."clerk_num"}, "register_num" = {ml r."register_num"}, "commission_date" = {ml r."commission_date"}, "commission_time" = {ml r."commission_time"}, "description" = {ml r."description"}, "catagory" = {ml r."catagory"}, "department" = {ml r."department"}, "qty" = {ml r."qty"}, "amount" = {ml r."amount"}, "tender_type" = {ml r."tender_type"}, "commission_paid" = {ml r."commission_paid"} WHERE "client_num" = {ml r."client_num"} AND "receipt_num" = {ml r."receipt_num"} AND "employee_num" = {ml r."employee_num"} AND "plu_num" = {ml r."plu_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow', 'download_cursor', 'sql', ' SELECT escrow.account_num, escrow.client_num, escrow.card_num, escrow.escrow_amt FROM DBA.escrow escrow WHERE escrow.last_modified > @last_download AND ( escrow.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE escrow.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow', 'download_delete_cursor', 'sql', ' SELECT DELETED_escrow.account_num, DELETED_escrow.client_num FROM DBA.DELETED_escrow DELETED_escrow, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_escrow.deleted_on > @last_download AND DELETED_escrow.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."escrow" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."escrow" ( "account_num", "client_num", "card_num", "escrow_amt" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."card_num"}, {ml r."escrow_amt"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'escrow', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."escrow" SET "card_num" = {ml r."card_num"}, "escrow_amt" = {ml r."escrow_amt"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'receipt_liability', 'download_cursor', 'sql', ' SELECT receipt_liability.id_number, receipt_liability.client_num, receipt_liability.line1, receipt_liability.line2, receipt_liability.line3, receipt_liability.line4, receipt_liability.line5, receipt_liability.line6, receipt_liability.line7, receipt_liability.line8, receipt_liability.line9, receipt_liability.line10, receipt_liability.line11, receipt_liability.line12, receipt_liability.line13, receipt_liability.line14, receipt_liability.line15, receipt_liability.line16, receipt_liability.line17, receipt_liability.line18, receipt_liability.line19, receipt_liability.line20, receipt_liability.line21, receipt_liability.line22, receipt_liability.line23, receipt_liability.line24, receipt_liability.line25, receipt_liability.line26, receipt_liability.line27, receipt_liability.line28, receipt_liability.line29, receipt_liability.line30, receipt_liability.line31, receipt_liability.line32, receipt_liability.line33, receipt_liability.line34, receipt_liability.line35, receipt_liability.line36, receipt_liability.line37, receipt_liability.line38, receipt_liability.line39, receipt_liability.line40, receipt_liability.line41, receipt_liability.line42, receipt_liability.line43, receipt_liability.line44, receipt_liability.line45, receipt_liability.line46, receipt_liability.line47, receipt_liability.line48, receipt_liability.line49, receipt_liability.line50 FROM DBA.receipt_liability receipt_liability WHERE receipt_liability.last_modified > @last_download AND ( receipt_liability.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE receipt_liability.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'receipt_liability', 'download_delete_cursor', 'sql', ' SELECT DELETED_receipt_liability.id_number, DELETED_receipt_liability.client_num FROM DBA.DELETED_receipt_liability DELETED_receipt_liability, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_receipt_liability.deleted_on > @last_download AND DELETED_receipt_liability.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'receipt_liability', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."receipt_liability" WHERE "id_number" = {ml r."id_number"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'receipt_liability', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."receipt_liability" ( "id_number", "client_num", "line1", "line2", "line3", "line4", "line5", "line6", "line7", "line8", "line9", "line10", "line11", "line12", "line13", "line14", "line15", "line16", "line17", "line18", "line19", "line20", "line21", "line22", "line23", "line24", "line25", "line26", "line27", "line28", "line29", "line30", "line31", "line32", "line33", "line34", "line35", "line36", "line37", "line38", "line39", "line40", "line41", "line42", "line43", "line44", "line45", "line46", "line47", "line48", "line49", "line50" ) VALUES ( {ml r."id_number"}, {ml r."client_num"}, {ml r."line1"}, {ml r."line2"}, {ml r."line3"}, {ml r."line4"}, {ml r."line5"}, {ml r."line6"}, {ml r."line7"}, {ml r."line8"}, {ml r."line9"}, {ml r."line10"}, {ml r."line11"}, {ml r."line12"}, {ml r."line13"}, {ml r."line14"}, {ml r."line15"}, {ml r."line16"}, {ml r."line17"}, {ml r."line18"}, {ml r."line19"}, {ml r."line20"}, {ml r."line21"}, {ml r."line22"}, {ml r."line23"}, {ml r."line24"}, {ml r."line25"}, {ml r."line26"}, {ml r."line27"}, {ml r."line28"}, {ml r."line29"}, {ml r."line30"}, {ml r."line31"}, {ml r."line32"}, {ml r."line33"}, {ml r."line34"}, {ml r."line35"}, {ml r."line36"}, {ml r."line37"}, {ml r."line38"}, {ml r."line39"}, {ml r."line40"}, {ml r."line41"}, {ml r."line42"}, {ml r."line43"}, {ml r."line44"}, {ml r."line45"}, {ml r."line46"}, {ml r."line47"}, {ml r."line48"}, {ml r."line49"}, {ml r."line50"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'receipt_liability', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."receipt_liability" SET "line1" = {ml r."line1"}, "line2" = {ml r."line2"}, "line3" = {ml r."line3"}, "line4" = {ml r."line4"}, "line5" = {ml r."line5"}, "line6" = {ml r."line6"}, "line7" = {ml r."line7"}, "line8" = {ml r."line8"}, "line9" = {ml r."line9"}, "line10" = {ml r."line10"}, "line11" = {ml r."line11"}, "line12" = {ml r."line12"}, "line13" = {ml r."line13"}, "line14" = {ml r."line14"}, "line15" = {ml r."line15"}, "line16" = {ml r."line16"}, "line17" = {ml r."line17"}, "line18" = {ml r."line18"}, "line19" = {ml r."line19"}, "line20" = {ml r."line20"}, "line21" = {ml r."line21"}, "line22" = {ml r."line22"}, "line23" = {ml r."line23"}, "line24" = {ml r."line24"}, "line25" = {ml r."line25"}, "line26" = {ml r."line26"}, "line27" = {ml r."line27"}, "line28" = {ml r."line28"}, "line29" = {ml r."line29"}, "line30" = {ml r."line30"}, "line31" = {ml r."line31"}, "line32" = {ml r."line32"}, "line33" = {ml r."line33"}, "line34" = {ml r."line34"}, "line35" = {ml r."line35"}, "line36" = {ml r."line36"}, "line37" = {ml r."line37"}, "line38" = {ml r."line38"}, "line39" = {ml r."line39"}, "line40" = {ml r."line40"}, "line41" = {ml r."line41"}, "line42" = {ml r."line42"}, "line43" = {ml r."line43"}, "line44" = {ml r."line44"}, "line45" = {ml r."line45"}, "line46" = {ml r."line46"}, "line47" = {ml r."line47"}, "line48" = {ml r."line48"}, "line49" = {ml r."line49"}, "line50" = {ml r."line50"} WHERE "id_number" = {ml r."id_number"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'retail_credit_card', 'download_cursor', 'sql', ' SELECT retail_credit_card.account_num, retail_credit_card.client_num, retail_credit_card.card_num, retail_credit_card.issuer, retail_credit_card.member_name, retail_credit_card.expdate FROM DBA.retail_credit_card retail_credit_card WHERE retail_credit_card.last_modified > @last_download AND ( retail_credit_card.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE retail_credit_card.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'retail_credit_card', 'download_delete_cursor', 'sql', ' SELECT DELETED_retail_credit_card.account_num, DELETED_retail_credit_card.client_num FROM DBA.DELETED_retail_credit_card DELETED_retail_credit_card, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_retail_credit_card.deleted_on > @last_download AND DELETED_retail_credit_card.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'retail_credit_card', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."retail_credit_card" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'retail_credit_card', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."retail_credit_card" ( "account_num", "client_num", "card_num", "issuer", "member_name", "expdate" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."card_num"}, {ml r."issuer"}, {ml r."member_name"}, {ml r."expdate"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'retail_credit_card', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."retail_credit_card" SET "card_num" = {ml r."card_num"}, "issuer" = {ml r."issuer"}, "member_name" = {ml r."member_name"}, "expdate" = {ml r."expdate"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'scheduler', 'download_cursor', 'sql', ' SELECT scheduler.first_name, scheduler.last_name, scheduler.mi, scheduler.club_mem, scheduler.account_num, scheduler.class_id, scheduler.addr, scheduler.city, scheduler.state, scheduler.zip, scheduler.home_phone, scheduler.cell_phone, scheduler.email, scheduler.active, scheduler.date_added, scheduler.date_removed, scheduler.client_num FROM DBA.scheduler scheduler WHERE scheduler.last_modified > @last_download AND ( scheduler.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE scheduler.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'scheduler', 'download_delete_cursor', 'sql', ' SELECT DELETED_scheduler.first_name, DELETED_scheduler.last_name, DELETED_scheduler.class_id, DELETED_scheduler.date_added, DELETED_scheduler.client_num FROM DBA.DELETED_scheduler DELETED_scheduler, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_scheduler.deleted_on > @last_download AND DELETED_scheduler.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'scheduler', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."scheduler" WHERE "first_name" = {ml r."first_name"} AND "last_name" = {ml r."last_name"} AND "class_id" = {ml r."class_id"} AND "date_added" = {ml r."date_added"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'scheduler', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."scheduler" ( "first_name", "last_name", "mi", "club_mem", "account_num", "class_id", "addr", "city", "state", "zip", "home_phone", "cell_phone", "email", "active", "date_added", "date_removed", "client_num" ) VALUES ( {ml r."first_name"}, {ml r."last_name"}, {ml r."mi"}, {ml r."club_mem"}, {ml r."account_num"}, {ml r."class_id"}, {ml r."addr"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."home_phone"}, {ml r."cell_phone"}, {ml r."email"}, {ml r."active"}, {ml r."date_added"}, {ml r."date_removed"}, {ml r."client_num"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'scheduler', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."scheduler" SET "mi" = {ml r."mi"}, "club_mem" = {ml r."club_mem"}, "account_num" = {ml r."account_num"}, "addr" = {ml r."addr"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "home_phone" = {ml r."home_phone"}, "cell_phone" = {ml r."cell_phone"}, "email" = {ml r."email"}, "active" = {ml r."active"}, "date_removed" = {ml r."date_removed"} WHERE "first_name" = {ml r."first_name"} AND "last_name" = {ml r."last_name"} AND "class_id" = {ml r."class_id"} AND "date_added" = {ml r."date_added"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'xlat_cancel', 'download_cursor', 'sql', ' SELECT xlat_cancel.client_num, xlat_cancel.cancel_code, xlat_cancel.description FROM DBA.xlat_cancel xlat_cancel WHERE xlat_cancel.last_modified > @last_download AND ( xlat_cancel.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE xlat_cancel.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'xlat_cancel', 'download_delete_cursor', 'sql', ' SELECT DELETED_xlat_cancel.client_num, DELETED_xlat_cancel.cancel_code FROM DBA.DELETED_xlat_cancel DELETED_xlat_cancel, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_xlat_cancel.deleted_on > @last_download AND DELETED_xlat_cancel.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'xlat_cancel', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."xlat_cancel" WHERE "client_num" = {ml r."client_num"} AND "cancel_code" = {ml r."cancel_code"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'xlat_cancel', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."xlat_cancel" ( "client_num", "cancel_code", "description" ) VALUES ( {ml r."client_num"}, {ml r."cancel_code"}, {ml r."description"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'xlat_cancel', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."xlat_cancel" SET "description" = {ml r."description"} WHERE "client_num" = {ml r."client_num"} AND "cancel_code" = {ml r."cancel_code"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_archive', 'download_cursor', 'sql', ' SELECT ebcs_archive.account_num, ebcs_archive.client_num, ebcs_archive.card_num, ebcs_archive.joint_accont_num, ebcs_archive.account_status, ebcs_archive.first_name, ebcs_archive.last_name, ebcs_archive.mi, ebcs_archive.generation, ebcs_archive.street_num, ebcs_archive.street_name, ebcs_archive.second_line_address, ebcs_archive.city, ebcs_archive.state, ebcs_archive.zip, ebcs_archive.home_phone, ebcs_archive.work_phone, ebcs_archive.work_ext, ebcs_archive.emp_name, ebcs_archive.emp_street_num, ebcs_archive.emp_street_name, ebcs_archive.emp_sec_line_addr, ebcs_archive.emp_city, ebcs_archive.emp_state, ebcs_archive.emp_zip, ebcs_archive.ssn, ebcs_archive.dob, ebcs_archive.month_of_dob, ebcs_archive.sex, ebcs_archive.height, ebcs_archive.weight, ebcs_archive.eye_color, ebcs_archive.hair_color, ebcs_archive.guarantor_last_name, ebcs_archive.guarantor_first_name, ebcs_archive.guarantor_mi, ebcs_archive.guarantor_address, ebcs_archive.guarantor_cit_st_zip, ebcs_archive.guarantor_phone_num, ebcs_archive.guarantor_work_num, ebcs_archive.guarantor_ssn, ebcs_archive.name_test, ebcs_archive.club_account, ebcs_archive.with_another_agency, ebcs_archive.bad_address, ebcs_archive.bad_home_num, ebcs_archive.bad_work_num, ebcs_archive.name_relative, ebcs_archive.address_relative, ebcs_archive.phone_num_relative, ebcs_archive.name_friend, ebcs_archive.phone_num_friend, ebcs_archive.source_code, ebcs_archive.contract_date, ebcs_archive.contract_expir_date, ebcs_archive.name_of_contract, ebcs_archive.term_of_contract, ebcs_archive.cash_price_of_contract, ebcs_archive.finance_percentage, ebcs_archive.amount_of_finance_charge, ebcs_archive.sales_tax_percentage, ebcs_archive.amount_of_sales_tax, ebcs_archive.total_of_sale, ebcs_archive.down_payment, ebcs_archive.financed_amount, ebcs_archive.number_of_payments, ebcs_archive.amount_of_payment, ebcs_archive.remaining_num_of_payments, ebcs_archive.total_of_all_payments, ebcs_archive.first_payment_due_date, ebcs_archive.next_payment_due_date, ebcs_archive.method_of_payment, ebcs_archive.remaining_bal_on_contract, ebcs_archive.current_paymts_due, ebcs_archive.deliq_1to10_day_due, ebcs_archive.deliq_11_to30_days_due, ebcs_archive.deliq_30to60_days_due, ebcs_archive.deliq_61to90_days_due, ebcs_archive.deliq_90to120_days_due, ebcs_archive.over_120_days, ebcs_archive.total_paymt_due, ebcs_archive.late_fees_owed, ebcs_archive.return_fees_owed, ebcs_archive.service_fees_owed, ebcs_archive.total_amt_due_now, ebcs_archive.payoff_amt, ebcs_archive.interest_saved, ebcs_archive.total_payoff_amt, ebcs_archive.method_of_last_paymt_recd, ebcs_archive.total_amt_of_last_payment, ebcs_archive.date_of_last_paymt, ebcs_archive.amt_applied_to_paymts, ebcs_archive.amt_applied_to_late_fees, ebcs_archive.amt_applied_to_return_fees, ebcs_archive.amt_applied_to_service_fees, ebcs_archive.days_deliq_when_recieved, ebcs_archive.num_of_days_late, ebcs_archive.billing_cycle, ebcs_archive.renewal_date, ebcs_archive.renewal_amt, ebcs_archive.special_charg_discript, ebcs_archive.num_of_times_to_charge, ebcs_archive.num_of_times_charged, ebcs_archive.first_date_to_charge, ebcs_archive.next_date_to_charge, ebcs_archive.bank_name, ebcs_archive.bank_address, ebcs_archive.bank_city, ebcs_archive.bank_state, ebcs_archive.bank_zip, ebcs_archive.routing_num, ebcs_archive.bank_acc_num, ebcs_archive.monthly_draft_amt, ebcs_archive.prenote_complete, ebcs_archive.monthly_eft_dues, ebcs_archive.monthly_pb_dues, ebcs_archive.mail_invoice, ebcs_archive.credit_card_name, ebcs_archive.credit_card_tye, ebcs_archive.credit_card_num, ebcs_archive.old_credit_card_num, ebcs_archive.monthly_cc_draft, ebcs_archive.credit_card_exprtion_date, ebcs_archive.last_name_on_back_acct, ebcs_archive.first_name_on_bank_acct, ebcs_archive.mi_on_bank_acct, ebcs_archive.last_name_on_credit_card, ebcs_archive.first_name_on_credit_card, ebcs_archive.mi_on_credit_card, ebcs_archive.num_of_lat_notices_maild, ebcs_archive.date_of_last_late_notice, ebcs_archive.number_of_pb_mailed, ebcs_archive.date_of_last_pb, ebcs_archive.date_1st_renewal_mailed, ebcs_archive.date_2nd_renewal_mailed, ebcs_archive.late_fee_waived, ebcs_archive.date_of_collection_letter, ebcs_archive.return_fee_waived, ebcs_archive.service_fee_waived, ebcs_archive.payments_waived, ebcs_archive.reason_for_cancel, ebcs_archive.reactivate_date, ebcs_archive.last_debit_date, ebcs_archive.date_of_court_hearing, ebcs_archive.member_since, ebcs_archive.original_contrat_date, ebcs_archive.rewrite_date, ebcs_archive.total_money_paid_to_date, ebcs_archive.fist_sale_person, ebcs_archive.sec_sale_person, ebcs_archive.commision, ebcs_archive.cancel_acc_after_date, ebcs_archive.purge_from_sys, ebcs_archive.rewitten_by, ebcs_archive.promise_to_pay_date, ebcs_archive.late_fee_charge, ebcs_archive.service_fee_charge, ebcs_archive.return_fee_charge, ebcs_archive.acct_created_by, ebcs_archive.date_account_entered, ebcs_archive.num_of_outgoin_calls, ebcs_archive.num_of_incoming_calls, ebcs_archive.reason_for_freeze, ebcs_archive.effective_date_freeze, ebcs_archive.extend_expire_date, ebcs_archive.misc_field, ebcs_archive.notes_line_one, ebcs_archive.notes_line_two, ebcs_archive.contract_on_hold, ebcs_archive.date_status_changed, ebcs_archive.old_account_num, ebcs_archive.id_picture, ebcs_archive.date_of_last_visit, ebcs_archive.number_of_visits, ebcs_archive.personal_trainer, ebcs_archive.total_princ_plus_fin_due, ebcs_archive.bacode_printed, ebcs_archive.date_barode_printed, ebcs_archive.num_times_barcode_printed, ebcs_archive.date_of_return, ebcs_archive.reason_returned, ebcs_archive.amount_of_return, ebcs_archive.due_date_of_return, ebcs_archive.amt_of_special_chrg, ebcs_archive.email_address, ebcs_archive.club_database, ebcs_archive.credit, ebcs_archive.change_date, ebcs_archive.create_date, ebcs_archive.previous_status, ebcs_archive.commish_paid, ebcs_archive.night_mod_time, ebcs_archive.map_member_ref_num, ebcs_archive.map_num_of_credits, ebcs_archive.map_credit_amt, ebcs_archive.map_credit_total, ebcs_archive.contract_type, ebcs_archive.ebcs_status, ebcs_archive.ebcs_status_date, ebcs_archive.service_1_yn, ebcs_archive.service_2_yn, ebcs_archive.service_3_yn, ebcs_archive.service_4_yn, ebcs_archive.service_5_yn, ebcs_archive.service_6_yn, ebcs_archive.service_7_yn, ebcs_archive.service_8_yn, ebcs_archive.service_9_yn, ebcs_archive.service_10_yn, ebcs_archive.all_days_hours_yn, ebcs_archive.monday_yn, ebcs_archive.tuesday_yn, ebcs_archive.wednesday_yn, ebcs_archive.thursday_yn, ebcs_archive.friday_yn, ebcs_archive.saturday_yn, ebcs_archive.sunday_yn, ebcs_archive.monday_start_time, ebcs_archive.monday_end_time, ebcs_archive.tuesday_start_time, ebcs_archive.tuesday_end_time, ebcs_archive.wednesday_start_time, ebcs_archive.wednesday_end_time, ebcs_archive.thursday_start_time, ebcs_archive.thursday_end_time, ebcs_archive.friday_start_time, ebcs_archive.friday_end_time, ebcs_archive.saturday_start_time, ebcs_archive.saturday_end_time, ebcs_archive.sunday_start_time, ebcs_archive.sunday_end_time, ebcs_archive.cur_mod_number, ebcs_archive.minor_yn, ebcs_archive.drivers_license, ebcs_archive.married_single, ebcs_archive.guarantor_relationship, ebcs_archive.guarantor_dob, ebcs_archive.auto_renewal, ebcs_archive.contract_edit_yn, ebcs_archive.initiation_fee, ebcs_archive.cash_price_edit_yn, ebcs_archive.renewal_term, ebcs_archive.department, ebcs_archive.cell_phone, ebcs_archive.relation_relative, ebcs_archive.relation, ebcs_archive.source_other, ebcs_archive.referred_by, ebcs_archive.cancel_other FROM DBA.ebcs_archive ebcs_archive WHERE ebcs_archive.last_modified > @last_download AND ( ebcs_archive.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE ebcs_archive.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_archive', 'download_delete_cursor', 'sql', ' SELECT DELETED_ebcs_archive.account_num, DELETED_ebcs_archive.client_num FROM DBA.DELETED_ebcs_archive DELETED_ebcs_archive, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs_archive.deleted_on > @last_download AND DELETED_ebcs_archive.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_archive', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."ebcs_archive" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_archive', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."ebcs_archive" ( "account_num", "client_num", "card_num", "joint_accont_num", "account_status", "first_name", "last_name", "mi", "generation", "street_num", "street_name", "second_line_address", "city", "state", "zip", "home_phone", "work_phone", "work_ext", "emp_name", "emp_street_num", "emp_street_name", "emp_sec_line_addr", "emp_city", "emp_state", "emp_zip", "ssn", "dob", "month_of_dob", "sex", "height", "weight", "eye_color", "hair_color", "guarantor_last_name", "guarantor_first_name", "guarantor_mi", "guarantor_address", "guarantor_cit_st_zip", "guarantor_phone_num", "guarantor_work_num", "guarantor_ssn", "name_test", "club_account", "with_another_agency", "bad_address", "bad_home_num", "bad_work_num", "name_relative", "address_relative", "phone_num_relative", "name_friend", "phone_num_friend", "source_code", "contract_date", "contract_expir_date", "name_of_contract", "term_of_contract", "cash_price_of_contract", "finance_percentage", "amount_of_finance_charge", "sales_tax_percentage", "amount_of_sales_tax", "total_of_sale", "down_payment", "financed_amount", "number_of_payments", "amount_of_payment", "remaining_num_of_payments", "total_of_all_payments", "first_payment_due_date", "next_payment_due_date", "method_of_payment", "remaining_bal_on_contract", "current_paymts_due", "deliq_1to10_day_due", "deliq_11_to30_days_due", "deliq_30to60_days_due", "deliq_61to90_days_due", "deliq_90to120_days_due", "over_120_days", "total_paymt_due", "late_fees_owed", "return_fees_owed", "service_fees_owed", "total_amt_due_now", "payoff_amt", "interest_saved", "total_payoff_amt", "method_of_last_paymt_recd", "total_amt_of_last_payment", "date_of_last_paymt", "amt_applied_to_paymts", "amt_applied_to_late_fees", "amt_applied_to_return_fees", "amt_applied_to_service_fees", "days_deliq_when_recieved", "num_of_days_late", "billing_cycle", "renewal_date", "renewal_amt", "special_charg_discript", "num_of_times_to_charge", "num_of_times_charged", "first_date_to_charge", "next_date_to_charge", "bank_name", "bank_address", "bank_city", "bank_state", "bank_zip", "routing_num", "bank_acc_num", "monthly_draft_amt", "prenote_complete", "monthly_eft_dues", "monthly_pb_dues", "mail_invoice", "credit_card_name", "credit_card_tye", "credit_card_num", "old_credit_card_num", "monthly_cc_draft", "credit_card_exprtion_date", "last_name_on_back_acct", "first_name_on_bank_acct", "mi_on_bank_acct", "last_name_on_credit_card", "first_name_on_credit_card", "mi_on_credit_card", "num_of_lat_notices_maild", "date_of_last_late_notice", "number_of_pb_mailed", "date_of_last_pb", "date_1st_renewal_mailed", "date_2nd_renewal_mailed", "late_fee_waived", "date_of_collection_letter", "return_fee_waived", "service_fee_waived", "payments_waived", "reason_for_cancel", "reactivate_date", "last_debit_date", "date_of_court_hearing", "member_since", "original_contrat_date", "rewrite_date", "total_money_paid_to_date", "fist_sale_person", "sec_sale_person", "commision", "cancel_acc_after_date", "purge_from_sys", "rewitten_by", "promise_to_pay_date", "late_fee_charge", "service_fee_charge", "return_fee_charge", "acct_created_by", "date_account_entered", "num_of_outgoin_calls", "num_of_incoming_calls", "reason_for_freeze", "effective_date_freeze", "extend_expire_date", "misc_field", "notes_line_one", "notes_line_two", "contract_on_hold", "date_status_changed", "old_account_num", "id_picture", "date_of_last_visit", "number_of_visits", "personal_trainer", "total_princ_plus_fin_due", "bacode_printed", "date_barode_printed", "num_times_barcode_printed", "date_of_return", "reason_returned", "amount_of_return", "due_date_of_return", "amt_of_special_chrg", "email_address", "club_database", "credit", "change_date", "create_date", "previous_status", "commish_paid", "night_mod_time", "map_member_ref_num", "map_num_of_credits", "map_credit_amt", "map_credit_total", "contract_type", "ebcs_status", "ebcs_status_date", "service_1_yn", "service_2_yn", "service_3_yn", "service_4_yn", "service_5_yn", "service_6_yn", "service_7_yn", "service_8_yn", "service_9_yn", "service_10_yn", "all_days_hours_yn", "monday_yn", "tuesday_yn", "wednesday_yn", "thursday_yn", "friday_yn", "saturday_yn", "sunday_yn", "monday_start_time", "monday_end_time", "tuesday_start_time", "tuesday_end_time", "wednesday_start_time", "wednesday_end_time", "thursday_start_time", "thursday_end_time", "friday_start_time", "friday_end_time", "saturday_start_time", "saturday_end_time", "sunday_start_time", "sunday_end_time", "cur_mod_number", "minor_yn", "drivers_license", "married_single", "guarantor_relationship", "guarantor_dob", "auto_renewal", "contract_edit_yn", "initiation_fee", "cash_price_edit_yn", "renewal_term", "department", "cell_phone", "relation_relative", "relation", "source_other", "referred_by", "cancel_other" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."card_num"}, {ml r."joint_accont_num"}, {ml r."account_status"}, {ml r."first_name"}, {ml r."last_name"}, {ml r."mi"}, {ml r."generation"}, {ml r."street_num"}, {ml r."street_name"}, {ml r."second_line_address"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."home_phone"}, {ml r."work_phone"}, {ml r."work_ext"}, {ml r."emp_name"}, {ml r."emp_street_num"}, {ml r."emp_street_name"}, {ml r."emp_sec_line_addr"}, {ml r."emp_city"}, {ml r."emp_state"}, {ml r."emp_zip"}, {ml r."ssn"}, {ml r."dob"}, {ml r."month_of_dob"}, {ml r."sex"}, {ml r."height"}, {ml r."weight"}, {ml r."eye_color"}, {ml r."hair_color"}, {ml r."guarantor_last_name"}, {ml r."guarantor_first_name"}, {ml r."guarantor_mi"}, {ml r."guarantor_address"}, {ml r."guarantor_cit_st_zip"}, {ml r."guarantor_phone_num"}, {ml r."guarantor_work_num"}, {ml r."guarantor_ssn"}, {ml r."name_test"}, {ml r."club_account"}, {ml r."with_another_agency"}, {ml r."bad_address"}, {ml r."bad_home_num"}, {ml r."bad_work_num"}, {ml r."name_relative"}, {ml r."address_relative"}, {ml r."phone_num_relative"}, {ml r."name_friend"}, {ml r."phone_num_friend"}, {ml r."source_code"}, {ml r."contract_date"}, {ml r."contract_expir_date"}, {ml r."name_of_contract"}, {ml r."term_of_contract"}, {ml r."cash_price_of_contract"}, {ml r."finance_percentage"}, {ml r."amount_of_finance_charge"}, {ml r."sales_tax_percentage"}, {ml r."amount_of_sales_tax"}, {ml r."total_of_sale"}, {ml r."down_payment"}, {ml r."financed_amount"}, {ml r."number_of_payments"}, {ml r."amount_of_payment"}, {ml r."remaining_num_of_payments"}, {ml r."total_of_all_payments"}, {ml r."first_payment_due_date"}, {ml r."next_payment_due_date"}, {ml r."method_of_payment"}, {ml r."remaining_bal_on_contract"}, {ml r."current_paymts_due"}, {ml r."deliq_1to10_day_due"}, {ml r."deliq_11_to30_days_due"}, {ml r."deliq_30to60_days_due"}, {ml r."deliq_61to90_days_due"}, {ml r."deliq_90to120_days_due"}, {ml r."over_120_days"}, {ml r."total_paymt_due"}, {ml r."late_fees_owed"}, {ml r."return_fees_owed"}, {ml r."service_fees_owed"}, {ml r."total_amt_due_now"}, {ml r."payoff_amt"}, {ml r."interest_saved"}, {ml r."total_payoff_amt"}, {ml r."method_of_last_paymt_recd"}, {ml r."total_amt_of_last_payment"}, {ml r."date_of_last_paymt"}, {ml r."amt_applied_to_paymts"}, {ml r."amt_applied_to_late_fees"}, {ml r."amt_applied_to_return_fees"}, {ml r."amt_applied_to_service_fees"}, {ml r."days_deliq_when_recieved"}, {ml r."num_of_days_late"}, {ml r."billing_cycle"}, {ml r."renewal_date"}, {ml r."renewal_amt"}, {ml r."special_charg_discript"}, {ml r."num_of_times_to_charge"}, {ml r."num_of_times_charged"}, {ml r."first_date_to_charge"}, {ml r."next_date_to_charge"}, {ml r."bank_name"}, {ml r."bank_address"}, {ml r."bank_city"}, {ml r."bank_state"}, {ml r."bank_zip"}, {ml r."routing_num"}, {ml r."bank_acc_num"}, {ml r."monthly_draft_amt"}, {ml r."prenote_complete"}, {ml r."monthly_eft_dues"}, {ml r."monthly_pb_dues"}, {ml r."mail_invoice"}, {ml r."credit_card_name"}, {ml r."credit_card_tye"}, {ml r."credit_card_num"}, {ml r."old_credit_card_num"}, {ml r."monthly_cc_draft"}, {ml r."credit_card_exprtion_date"}, {ml r."last_name_on_back_acct"}, {ml r."first_name_on_bank_acct"}, {ml r."mi_on_bank_acct"}, {ml r."last_name_on_credit_card"}, {ml r."first_name_on_credit_card"}, {ml r."mi_on_credit_card"}, {ml r."num_of_lat_notices_maild"}, {ml r."date_of_last_late_notice"}, {ml r."number_of_pb_mailed"}, {ml r."date_of_last_pb"}, {ml r."date_1st_renewal_mailed"}, {ml r."date_2nd_renewal_mailed"}, {ml r."late_fee_waived"}, {ml r."date_of_collection_letter"}, {ml r."return_fee_waived"}, {ml r."service_fee_waived"}, {ml r."payments_waived"}, {ml r."reason_for_cancel"}, {ml r."reactivate_date"}, {ml r."last_debit_date"}, {ml r."date_of_court_hearing"}, {ml r."member_since"}, {ml r."original_contrat_date"}, {ml r."rewrite_date"}, {ml r."total_money_paid_to_date"}, {ml r."fist_sale_person"}, {ml r."sec_sale_person"}, {ml r."commision"}, {ml r."cancel_acc_after_date"}, {ml r."purge_from_sys"}, {ml r."rewitten_by"}, {ml r."promise_to_pay_date"}, {ml r."late_fee_charge"}, {ml r."service_fee_charge"}, {ml r."return_fee_charge"}, {ml r."acct_created_by"}, {ml r."date_account_entered"}, {ml r."num_of_outgoin_calls"}, {ml r."num_of_incoming_calls"}, {ml r."reason_for_freeze"}, {ml r."effective_date_freeze"}, {ml r."extend_expire_date"}, {ml r."misc_field"}, {ml r."notes_line_one"}, {ml r."notes_line_two"}, {ml r."contract_on_hold"}, {ml r."date_status_changed"}, {ml r."old_account_num"}, {ml r."id_picture"}, {ml r."date_of_last_visit"}, {ml r."number_of_visits"}, {ml r."personal_trainer"}, {ml r."total_princ_plus_fin_due"}, {ml r."bacode_printed"}, {ml r."date_barode_printed"}, {ml r."num_times_barcode_printed"}, {ml r."date_of_return"}, {ml r."reason_returned"}, {ml r."amount_of_return"}, {ml r."due_date_of_return"}, {ml r."amt_of_special_chrg"}, {ml r."email_address"}, {ml r."club_database"}, {ml r."credit"}, {ml r."change_date"}, {ml r."create_date"}, {ml r."previous_status"}, {ml r."commish_paid"}, {ml r."night_mod_time"}, {ml r."map_member_ref_num"}, {ml r."map_num_of_credits"}, {ml r."map_credit_amt"}, {ml r."map_credit_total"}, {ml r."contract_type"}, {ml r."ebcs_status"}, {ml r."ebcs_status_date"}, {ml r."service_1_yn"}, {ml r."service_2_yn"}, {ml r."service_3_yn"}, {ml r."service_4_yn"}, {ml r."service_5_yn"}, {ml r."service_6_yn"}, {ml r."service_7_yn"}, {ml r."service_8_yn"}, {ml r."service_9_yn"}, {ml r."service_10_yn"}, {ml r."all_days_hours_yn"}, {ml r."monday_yn"}, {ml r."tuesday_yn"}, {ml r."wednesday_yn"}, {ml r."thursday_yn"}, {ml r."friday_yn"}, {ml r."saturday_yn"}, {ml r."sunday_yn"}, {ml r."monday_start_time"}, {ml r."monday_end_time"}, {ml r."tuesday_start_time"}, {ml r."tuesday_end_time"}, {ml r."wednesday_start_time"}, {ml r."wednesday_end_time"}, {ml r."thursday_start_time"}, {ml r."thursday_end_time"}, {ml r."friday_start_time"}, {ml r."friday_end_time"}, {ml r."saturday_start_time"}, {ml r."saturday_end_time"}, {ml r."sunday_start_time"}, {ml r."sunday_end_time"}, {ml r."cur_mod_number"}, {ml r."minor_yn"}, {ml r."drivers_license"}, {ml r."married_single"}, {ml r."guarantor_relationship"}, {ml r."guarantor_dob"}, {ml r."auto_renewal"}, {ml r."contract_edit_yn"}, {ml r."initiation_fee"}, {ml r."cash_price_edit_yn"}, {ml r."renewal_term"}, {ml r."department"}, {ml r."cell_phone"}, {ml r."relation_relative"}, {ml r."relation"}, {ml r."source_other"}, {ml r."referred_by"}, {ml r."cancel_other"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_archive', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."ebcs_archive" SET "card_num" = {ml r."card_num"}, "joint_accont_num" = {ml r."joint_accont_num"}, "account_status" = {ml r."account_status"}, "first_name" = {ml r."first_name"}, "last_name" = {ml r."last_name"}, "mi" = {ml r."mi"}, "generation" = {ml r."generation"}, "street_num" = {ml r."street_num"}, "street_name" = {ml r."street_name"}, "second_line_address" = {ml r."second_line_address"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "home_phone" = {ml r."home_phone"}, "work_phone" = {ml r."work_phone"}, "work_ext" = {ml r."work_ext"}, "emp_name" = {ml r."emp_name"}, "emp_street_num" = {ml r."emp_street_num"}, "emp_street_name" = {ml r."emp_street_name"}, "emp_sec_line_addr" = {ml r."emp_sec_line_addr"}, "emp_city" = {ml r."emp_city"}, "emp_state" = {ml r."emp_state"}, "emp_zip" = {ml r."emp_zip"}, "ssn" = {ml r."ssn"}, "dob" = {ml r."dob"}, "month_of_dob" = {ml r."month_of_dob"}, "sex" = {ml r."sex"}, "height" = {ml r."height"}, "weight" = {ml r."weight"}, "eye_color" = {ml r."eye_color"}, "hair_color" = {ml r."hair_color"}, "guarantor_last_name" = {ml r."guarantor_last_name"}, "guarantor_first_name" = {ml r."guarantor_first_name"}, "guarantor_mi" = {ml r."guarantor_mi"}, "guarantor_address" = {ml r."guarantor_address"}, "guarantor_cit_st_zip" = {ml r."guarantor_cit_st_zip"}, "guarantor_phone_num" = {ml r."guarantor_phone_num"}, "guarantor_work_num" = {ml r."guarantor_work_num"}, "guarantor_ssn" = {ml r."guarantor_ssn"}, "name_test" = {ml r."name_test"}, "club_account" = {ml r."club_account"}, "with_another_agency" = {ml r."with_another_agency"}, "bad_address" = {ml r."bad_address"}, "bad_home_num" = {ml r."bad_home_num"}, "bad_work_num" = {ml r."bad_work_num"}, "name_relative" = {ml r."name_relative"}, "address_relative" = {ml r."address_relative"}, "phone_num_relative" = {ml r."phone_num_relative"}, "name_friend" = {ml r."name_friend"}, "phone_num_friend" = {ml r."phone_num_friend"}, "source_code" = {ml r."source_code"}, "contract_date" = {ml r."contract_date"}, "contract_expir_date" = {ml r."contract_expir_date"}, "name_of_contract" = {ml r."name_of_contract"}, "term_of_contract" = {ml r."term_of_contract"}, "cash_price_of_contract" = {ml r."cash_price_of_contract"}, "finance_percentage" = {ml r."finance_percentage"}, "amount_of_finance_charge" = {ml r."amount_of_finance_charge"}, "sales_tax_percentage" = {ml r."sales_tax_percentage"}, "amount_of_sales_tax" = {ml r."amount_of_sales_tax"}, "total_of_sale" = {ml r."total_of_sale"}, "down_payment" = {ml r."down_payment"}, "financed_amount" = {ml r."financed_amount"}, "number_of_payments" = {ml r."number_of_payments"}, "amount_of_payment" = {ml r."amount_of_payment"}, "remaining_num_of_payments" = {ml r."remaining_num_of_payments"}, "total_of_all_payments" = {ml r."total_of_all_payments"}, "first_payment_due_date" = {ml r."first_payment_due_date"}, "next_payment_due_date" = {ml r."next_payment_due_date"}, "method_of_payment" = {ml r."method_of_payment"}, "remaining_bal_on_contract" = {ml r."remaining_bal_on_contract"}, "current_paymts_due" = {ml r."current_paymts_due"}, "deliq_1to10_day_due" = {ml r."deliq_1to10_day_due"}, "deliq_11_to30_days_due" = {ml r."deliq_11_to30_days_due"}, "deliq_30to60_days_due" = {ml r."deliq_30to60_days_due"}, "deliq_61to90_days_due" = {ml r."deliq_61to90_days_due"}, "deliq_90to120_days_due" = {ml r."deliq_90to120_days_due"}, "over_120_days" = {ml r."over_120_days"}, "total_paymt_due" = {ml r."total_paymt_due"}, "late_fees_owed" = {ml r."late_fees_owed"}, "return_fees_owed" = {ml r."return_fees_owed"}, "service_fees_owed" = {ml r."service_fees_owed"}, "total_amt_due_now" = {ml r."total_amt_due_now"}, "payoff_amt" = {ml r."payoff_amt"}, "interest_saved" = {ml r."interest_saved"}, "total_payoff_amt" = {ml r."total_payoff_amt"}, "method_of_last_paymt_recd" = {ml r."method_of_last_paymt_recd"}, "total_amt_of_last_payment" = {ml r."total_amt_of_last_payment"}, "date_of_last_paymt" = {ml r."date_of_last_paymt"}, "amt_applied_to_paymts" = {ml r."amt_applied_to_paymts"}, "amt_applied_to_late_fees" = {ml r."amt_applied_to_late_fees"}, "amt_applied_to_return_fees" = {ml r."amt_applied_to_return_fees"}, "amt_applied_to_service_fees" = {ml r."amt_applied_to_service_fees"}, "days_deliq_when_recieved" = {ml r."days_deliq_when_recieved"}, "num_of_days_late" = {ml r."num_of_days_late"}, "billing_cycle" = {ml r."billing_cycle"}, "renewal_date" = {ml r."renewal_date"}, "renewal_amt" = {ml r."renewal_amt"}, "special_charg_discript" = {ml r."special_charg_discript"}, "num_of_times_to_charge" = {ml r."num_of_times_to_charge"}, "num_of_times_charged" = {ml r."num_of_times_charged"}, "first_date_to_charge" = {ml r."first_date_to_charge"}, "next_date_to_charge" = {ml r."next_date_to_charge"}, "bank_name" = {ml r."bank_name"}, "bank_address" = {ml r."bank_address"}, "bank_city" = {ml r."bank_city"}, "bank_state" = {ml r."bank_state"}, "bank_zip" = {ml r."bank_zip"}, "routing_num" = {ml r."routing_num"}, "bank_acc_num" = {ml r."bank_acc_num"}, "monthly_draft_amt" = {ml r."monthly_draft_amt"}, "prenote_complete" = {ml r."prenote_complete"}, "monthly_eft_dues" = {ml r."monthly_eft_dues"}, "monthly_pb_dues" = {ml r."monthly_pb_dues"}, "mail_invoice" = {ml r."mail_invoice"}, "credit_card_name" = {ml r."credit_card_name"}, "credit_card_tye" = {ml r."credit_card_tye"}, "credit_card_num" = {ml r."credit_card_num"}, "old_credit_card_num" = {ml r."old_credit_card_num"}, "monthly_cc_draft" = {ml r."monthly_cc_draft"}, "credit_card_exprtion_date" = {ml r."credit_card_exprtion_date"}, "last_name_on_back_acct" = {ml r."last_name_on_back_acct"}, "first_name_on_bank_acct" = {ml r."first_name_on_bank_acct"}, "mi_on_bank_acct" = {ml r."mi_on_bank_acct"}, "last_name_on_credit_card" = {ml r."last_name_on_credit_card"}, "first_name_on_credit_card" = {ml r."first_name_on_credit_card"}, "mi_on_credit_card" = {ml r."mi_on_credit_card"}, "num_of_lat_notices_maild" = {ml r."num_of_lat_notices_maild"}, "date_of_last_late_notice" = {ml r."date_of_last_late_notice"}, "number_of_pb_mailed" = {ml r."number_of_pb_mailed"}, "date_of_last_pb" = {ml r."date_of_last_pb"}, "date_1st_renewal_mailed" = {ml r."date_1st_renewal_mailed"}, "date_2nd_renewal_mailed" = {ml r."date_2nd_renewal_mailed"}, "late_fee_waived" = {ml r."late_fee_waived"}, "date_of_collection_letter" = {ml r."date_of_collection_letter"}, "return_fee_waived" = {ml r."return_fee_waived"}, "service_fee_waived" = {ml r."service_fee_waived"}, "payments_waived" = {ml r."payments_waived"}, "reason_for_cancel" = {ml r."reason_for_cancel"}, "reactivate_date" = {ml r."reactivate_date"}, "last_debit_date" = {ml r."last_debit_date"}, "date_of_court_hearing" = {ml r."date_of_court_hearing"}, "member_since" = {ml r."member_since"}, "original_contrat_date" = {ml r."original_contrat_date"}, "rewrite_date" = {ml r."rewrite_date"}, "total_money_paid_to_date" = {ml r."total_money_paid_to_date"}, "fist_sale_person" = {ml r."fist_sale_person"}, "sec_sale_person" = {ml r."sec_sale_person"}, "commision" = {ml r."commision"}, "cancel_acc_after_date" = {ml r."cancel_acc_after_date"}, "purge_from_sys" = {ml r."purge_from_sys"}, "rewitten_by" = {ml r."rewitten_by"}, "promise_to_pay_date" = {ml r."promise_to_pay_date"}, "late_fee_charge" = {ml r."late_fee_charge"}, "service_fee_charge" = {ml r."service_fee_charge"}, "return_fee_charge" = {ml r."return_fee_charge"}, "acct_created_by" = {ml r."acct_created_by"}, "date_account_entered" = {ml r."date_account_entered"}, "num_of_outgoin_calls" = {ml r."num_of_outgoin_calls"}, "num_of_incoming_calls" = {ml r."num_of_incoming_calls"}, "reason_for_freeze" = {ml r."reason_for_freeze"}, "effective_date_freeze" = {ml r."effective_date_freeze"}, "extend_expire_date" = {ml r."extend_expire_date"}, "misc_field" = {ml r."misc_field"}, "notes_line_one" = {ml r."notes_line_one"}, "notes_line_two" = {ml r."notes_line_two"}, "contract_on_hold" = {ml r."contract_on_hold"}, "date_status_changed" = {ml r."date_status_changed"}, "old_account_num" = {ml r."old_account_num"}, "id_picture" = {ml r."id_picture"}, "date_of_last_visit" = {ml r."date_of_last_visit"}, "number_of_visits" = {ml r."number_of_visits"}, "personal_trainer" = {ml r."personal_trainer"}, "total_princ_plus_fin_due" = {ml r."total_princ_plus_fin_due"}, "bacode_printed" = {ml r."bacode_printed"}, "date_barode_printed" = {ml r."date_barode_printed"}, "num_times_barcode_printed" = {ml r."num_times_barcode_printed"}, "date_of_return" = {ml r."date_of_return"}, "reason_returned" = {ml r."reason_returned"}, "amount_of_return" = {ml r."amount_of_return"}, "due_date_of_return" = {ml r."due_date_of_return"}, "amt_of_special_chrg" = {ml r."amt_of_special_chrg"}, "email_address" = {ml r."email_address"}, "club_database" = {ml r."club_database"}, "credit" = {ml r."credit"}, "change_date" = {ml r."change_date"}, "create_date" = {ml r."create_date"}, "previous_status" = {ml r."previous_status"}, "commish_paid" = {ml r."commish_paid"}, "night_mod_time" = {ml r."night_mod_time"}, "map_member_ref_num" = {ml r."map_member_ref_num"}, "map_num_of_credits" = {ml r."map_num_of_credits"}, "map_credit_amt" = {ml r."map_credit_amt"}, "map_credit_total" = {ml r."map_credit_total"}, "contract_type" = {ml r."contract_type"}, "ebcs_status" = {ml r."ebcs_status"}, "ebcs_status_date" = {ml r."ebcs_status_date"}, "service_1_yn" = {ml r."service_1_yn"}, "service_2_yn" = {ml r."service_2_yn"}, "service_3_yn" = {ml r."service_3_yn"}, "service_4_yn" = {ml r."service_4_yn"}, "service_5_yn" = {ml r."service_5_yn"}, "service_6_yn" = {ml r."service_6_yn"}, "service_7_yn" = {ml r."service_7_yn"}, "service_8_yn" = {ml r."service_8_yn"}, "service_9_yn" = {ml r."service_9_yn"}, "service_10_yn" = {ml r."service_10_yn"}, "all_days_hours_yn" = {ml r."all_days_hours_yn"}, "monday_yn" = {ml r."monday_yn"}, "tuesday_yn" = {ml r."tuesday_yn"}, "wednesday_yn" = {ml r."wednesday_yn"}, "thursday_yn" = {ml r."thursday_yn"}, "friday_yn" = {ml r."friday_yn"}, "saturday_yn" = {ml r."saturday_yn"}, "sunday_yn" = {ml r."sunday_yn"}, "monday_start_time" = {ml r."monday_start_time"}, "monday_end_time" = {ml r."monday_end_time"}, "tuesday_start_time" = {ml r."tuesday_start_time"}, "tuesday_end_time" = {ml r."tuesday_end_time"}, "wednesday_start_time" = {ml r."wednesday_start_time"}, "wednesday_end_time" = {ml r."wednesday_end_time"}, "thursday_start_time" = {ml r."thursday_start_time"}, "thursday_end_time" = {ml r."thursday_end_time"}, "friday_start_time" = {ml r."friday_start_time"}, "friday_end_time" = {ml r."friday_end_time"}, "saturday_start_time" = {ml r."saturday_start_time"}, "saturday_end_time" = {ml r."saturday_end_time"}, "sunday_start_time" = {ml r."sunday_start_time"}, "sunday_end_time" = {ml r."sunday_end_time"}, "cur_mod_number" = {ml r."cur_mod_number"}, "minor_yn" = {ml r."minor_yn"}, "drivers_license" = {ml r."drivers_license"}, "married_single" = {ml r."married_single"}, "guarantor_relationship" = {ml r."guarantor_relationship"}, "guarantor_dob" = {ml r."guarantor_dob"}, "auto_renewal" = {ml r."auto_renewal"}, "contract_edit_yn" = {ml r."contract_edit_yn"}, "initiation_fee" = {ml r."initiation_fee"}, "cash_price_edit_yn" = {ml r."cash_price_edit_yn"}, "renewal_term" = {ml r."renewal_term"}, "department" = {ml r."department"}, "cell_phone" = {ml r."cell_phone"}, "relation_relative" = {ml r."relation_relative"}, "relation" = {ml r."relation"}, "source_other" = {ml r."source_other"}, "referred_by" = {ml r."referred_by"}, "cancel_other" = {ml r."cancel_other"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_temp_changes', 'download_cursor', 'sql', ' SELECT ebcs_temp_changes.account_num, ebcs_temp_changes.client_num, ebcs_temp_changes.card_num, ebcs_temp_changes.joint_accont_num, ebcs_temp_changes.account_status, ebcs_temp_changes.first_name, ebcs_temp_changes.last_name, ebcs_temp_changes.mi, ebcs_temp_changes.generation, ebcs_temp_changes.street_num, ebcs_temp_changes.street_name, ebcs_temp_changes.second_line_address, ebcs_temp_changes.city, ebcs_temp_changes.state, ebcs_temp_changes.zip, ebcs_temp_changes.home_phone, ebcs_temp_changes.work_phone, ebcs_temp_changes.work_ext, ebcs_temp_changes.emp_name, ebcs_temp_changes.emp_street_num, ebcs_temp_changes.emp_street_name, ebcs_temp_changes.emp_sec_line_addr, ebcs_temp_changes.emp_city, ebcs_temp_changes.emp_state, ebcs_temp_changes.emp_zip, ebcs_temp_changes.ssn, ebcs_temp_changes.dob, ebcs_temp_changes.month_of_dob, ebcs_temp_changes.sex, ebcs_temp_changes.height, ebcs_temp_changes.weight, ebcs_temp_changes.eye_color, ebcs_temp_changes.hair_color, ebcs_temp_changes.guarantor_last_name, ebcs_temp_changes.guarantor_first_name, ebcs_temp_changes.guarantor_mi, ebcs_temp_changes.guarantor_address, ebcs_temp_changes.guarantor_cit_st_zip, ebcs_temp_changes.guarantor_phone_num, ebcs_temp_changes.guarantor_work_num, ebcs_temp_changes.guarantor_ssn, ebcs_temp_changes.name_test, ebcs_temp_changes.club_account, ebcs_temp_changes.with_another_agency, ebcs_temp_changes.bad_address, ebcs_temp_changes.bad_home_num, ebcs_temp_changes.bad_work_num, ebcs_temp_changes.name_relative, ebcs_temp_changes.address_relative, ebcs_temp_changes.phone_num_relative, ebcs_temp_changes.name_friend, ebcs_temp_changes.phone_num_friend, ebcs_temp_changes.source_code, ebcs_temp_changes.contract_date, ebcs_temp_changes.contract_expir_date, ebcs_temp_changes.name_of_contract, ebcs_temp_changes.term_of_contract, ebcs_temp_changes.cash_price_of_contract, ebcs_temp_changes.finance_percentage, ebcs_temp_changes.amount_of_finance_charge, ebcs_temp_changes.sales_tax_percentage, ebcs_temp_changes.amount_of_sales_tax, ebcs_temp_changes.total_of_sale, ebcs_temp_changes.down_payment, ebcs_temp_changes.financed_amount, ebcs_temp_changes.number_of_payments, ebcs_temp_changes.amount_of_payment, ebcs_temp_changes.remaining_num_of_payments, ebcs_temp_changes.total_of_all_payments, ebcs_temp_changes.first_payment_due_date, ebcs_temp_changes.next_payment_due_date, ebcs_temp_changes.method_of_payment, ebcs_temp_changes.remaining_bal_on_contract, ebcs_temp_changes.current_paymts_due, ebcs_temp_changes.deliq_1to10_day_due, ebcs_temp_changes.deliq_11_to30_days_due, ebcs_temp_changes.deliq_30to60_days_due, ebcs_temp_changes.deliq_61to90_days_due, ebcs_temp_changes.deliq_90to120_days_due, ebcs_temp_changes.over_120_days, ebcs_temp_changes.total_paymt_due, ebcs_temp_changes.late_fees_owed, ebcs_temp_changes.return_fees_owed, ebcs_temp_changes.service_fees_owed, ebcs_temp_changes.total_amt_due_now, ebcs_temp_changes.payoff_amt, ebcs_temp_changes.interest_saved, ebcs_temp_changes.total_payoff_amt, ebcs_temp_changes.method_of_last_paymt_recd, ebcs_temp_changes.total_amt_of_last_payment, ebcs_temp_changes.date_of_last_paymt, ebcs_temp_changes.amt_applied_to_paymts, ebcs_temp_changes.amt_applied_to_late_fees, ebcs_temp_changes.amt_applied_to_return_fees, ebcs_temp_changes.amt_applied_to_service_fees, ebcs_temp_changes.days_deliq_when_recieved, ebcs_temp_changes.num_of_days_late, ebcs_temp_changes.billing_cycle, ebcs_temp_changes.renewal_date, ebcs_temp_changes.renewal_amt, ebcs_temp_changes.special_charg_discript, ebcs_temp_changes.num_of_times_to_charge, ebcs_temp_changes.num_of_times_charged, ebcs_temp_changes.first_date_to_charge, ebcs_temp_changes.next_date_to_charge, ebcs_temp_changes.bank_name, ebcs_temp_changes.bank_address, ebcs_temp_changes.bank_city, ebcs_temp_changes.bank_state, ebcs_temp_changes.bank_zip, ebcs_temp_changes.routing_num, ebcs_temp_changes.bank_acc_num, ebcs_temp_changes.monthly_draft_amt, ebcs_temp_changes.prenote_complete, ebcs_temp_changes.monthly_eft_dues, ebcs_temp_changes.monthly_pb_dues, ebcs_temp_changes.mail_invoice, ebcs_temp_changes.credit_card_name, ebcs_temp_changes.credit_card_tye, ebcs_temp_changes.credit_card_num, ebcs_temp_changes.old_credit_card_num, ebcs_temp_changes.monthly_cc_draft, ebcs_temp_changes.credit_card_exprtion_date, ebcs_temp_changes.last_name_on_back_acct, ebcs_temp_changes.first_name_on_bank_acct, ebcs_temp_changes.mi_on_bank_acct, ebcs_temp_changes.last_name_on_credit_card, ebcs_temp_changes.first_name_on_credit_card, ebcs_temp_changes.mi_on_credit_card, ebcs_temp_changes.num_of_lat_notices_maild, ebcs_temp_changes.date_of_last_late_notice, ebcs_temp_changes.number_of_pb_mailed, ebcs_temp_changes.date_of_last_pb, ebcs_temp_changes.date_1st_renewal_mailed, ebcs_temp_changes.date_2nd_renewal_mailed, ebcs_temp_changes.late_fee_waived, ebcs_temp_changes.date_of_collection_letter, ebcs_temp_changes.return_fee_waived, ebcs_temp_changes.service_fee_waived, ebcs_temp_changes.payments_waived, ebcs_temp_changes.reason_for_cancel, ebcs_temp_changes.reactivate_date, ebcs_temp_changes.last_debit_date, ebcs_temp_changes.date_of_court_hearing, ebcs_temp_changes.member_since, ebcs_temp_changes.original_contrat_date, ebcs_temp_changes.rewrite_date, ebcs_temp_changes.total_money_paid_to_date, ebcs_temp_changes.fist_sale_person, ebcs_temp_changes.sec_sale_person, ebcs_temp_changes.commision, ebcs_temp_changes.cancel_acc_after_date, ebcs_temp_changes.purge_from_sys, ebcs_temp_changes.rewitten_by, ebcs_temp_changes.promise_to_pay_date, ebcs_temp_changes.late_fee_charge, ebcs_temp_changes.service_fee_charge, ebcs_temp_changes.return_fee_charge, ebcs_temp_changes.acct_created_by, ebcs_temp_changes.date_account_entered, ebcs_temp_changes.num_of_outgoin_calls, ebcs_temp_changes.num_of_incoming_calls, ebcs_temp_changes.reason_for_freeze, ebcs_temp_changes.effective_date_freeze, ebcs_temp_changes.extend_expire_date, ebcs_temp_changes.misc_field, ebcs_temp_changes.notes_line_one, ebcs_temp_changes.notes_line_two, ebcs_temp_changes.contract_on_hold, ebcs_temp_changes.date_status_changed, ebcs_temp_changes.old_account_num, ebcs_temp_changes.id_picture, ebcs_temp_changes.date_of_last_visit, ebcs_temp_changes.number_of_visits, ebcs_temp_changes.personal_trainer, ebcs_temp_changes.total_princ_plus_fin_due, ebcs_temp_changes.bacode_printed, ebcs_temp_changes.date_barode_printed, ebcs_temp_changes.num_times_barcode_printed, ebcs_temp_changes.date_of_return, ebcs_temp_changes.reason_returned, ebcs_temp_changes.amount_of_return, ebcs_temp_changes.due_date_of_return, ebcs_temp_changes.amt_of_special_chrg, ebcs_temp_changes.email_address, ebcs_temp_changes.club_database, ebcs_temp_changes.credit, ebcs_temp_changes.change_date, ebcs_temp_changes.create_date, ebcs_temp_changes.previous_status, ebcs_temp_changes.commish_paid, ebcs_temp_changes.night_mod_time, ebcs_temp_changes.map_member_ref_num, ebcs_temp_changes.map_num_of_credits, ebcs_temp_changes.map_credit_amt, ebcs_temp_changes.map_credit_total, ebcs_temp_changes.contract_type, ebcs_temp_changes.ebcs_status, ebcs_temp_changes.ebcs_status_date, ebcs_temp_changes.service_1_yn, ebcs_temp_changes.service_2_yn, ebcs_temp_changes.service_3_yn, ebcs_temp_changes.service_4_yn, ebcs_temp_changes.service_5_yn, ebcs_temp_changes.service_6_yn, ebcs_temp_changes.service_7_yn, ebcs_temp_changes.service_8_yn, ebcs_temp_changes.service_9_yn, ebcs_temp_changes.service_10_yn, ebcs_temp_changes.all_days_hours_yn, ebcs_temp_changes.monday_yn, ebcs_temp_changes.tuesday_yn, ebcs_temp_changes.wednesday_yn, ebcs_temp_changes.thursday_yn, ebcs_temp_changes.friday_yn, ebcs_temp_changes.saturday_yn, ebcs_temp_changes.sunday_yn, ebcs_temp_changes.monday_start_time, ebcs_temp_changes.monday_end_time, ebcs_temp_changes.tuesday_start_time, ebcs_temp_changes.tuesday_end_time, ebcs_temp_changes.wednesday_start_time, ebcs_temp_changes.wednesday_end_time, ebcs_temp_changes.thursday_start_time, ebcs_temp_changes.thursday_end_time, ebcs_temp_changes.friday_start_time, ebcs_temp_changes.friday_end_time, ebcs_temp_changes.saturday_start_time, ebcs_temp_changes.saturday_end_time, ebcs_temp_changes.sunday_start_time, ebcs_temp_changes.sunday_end_time, ebcs_temp_changes.cur_mod_number, ebcs_temp_changes.minor_yn, ebcs_temp_changes.drivers_license, ebcs_temp_changes.married_single, ebcs_temp_changes.guarantor_relationship, ebcs_temp_changes.guarantor_dob, ebcs_temp_changes.auto_renewal, ebcs_temp_changes.contract_edit_yn, ebcs_temp_changes.initiation_fee, ebcs_temp_changes.cash_price_edit_yn, ebcs_temp_changes.renewal_term, ebcs_temp_changes.department, ebcs_temp_changes.cell_phone, ebcs_temp_changes.relation_relative, ebcs_temp_changes.relation, ebcs_temp_changes.source_other, ebcs_temp_changes.referred_by, ebcs_temp_changes.cancel_other, ebcs_temp_changes.prorate_dues, ebcs_temp_changes.prorate_maint_fee, ebcs_temp_changes.maint_fee, ebcs_temp_changes.maint_cycle, ebcs_temp_changes.maint_month, ebcs_temp_changes.maint_day, ebcs_temp_changes.preenroll_yn, ebcs_temp_changes.sales_tax_dp, ebcs_temp_changes.amount_of_payment_club, ebcs_temp_changes.total_of_all_payments_club, ebcs_temp_changes.prorate_dues_club, ebcs_temp_changes.initiation_fee_club, ebcs_temp_changes.prorate_maint_fee_club, ebcs_temp_changes.reciprocity_yn FROM DBA.ebcs_temp_changes ebcs_temp_changes WHERE ebcs_temp_changes.last_modified > @last_download AND ( ebcs_temp_changes.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE ebcs_temp_changes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_temp_changes', 'download_delete_cursor', 'sql', ' SELECT DELETED_ebcs_temp_changes.account_num, DELETED_ebcs_temp_changes.client_num FROM DBA.DELETED_ebcs_temp_changes DELETED_ebcs_temp_changes, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs_temp_changes.deleted_on > @last_download AND DELETED_ebcs_temp_changes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_temp_changes', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."ebcs_temp_changes" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_temp_changes', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."ebcs_temp_changes" ( "account_num", "client_num", "card_num", "joint_accont_num", "account_status", "first_name", "last_name", "mi", "generation", "street_num", "street_name", "second_line_address", "city", "state", "zip", "home_phone", "work_phone", "work_ext", "emp_name", "emp_street_num", "emp_street_name", "emp_sec_line_addr", "emp_city", "emp_state", "emp_zip", "ssn", "dob", "month_of_dob", "sex", "height", "weight", "eye_color", "hair_color", "guarantor_last_name", "guarantor_first_name", "guarantor_mi", "guarantor_address", "guarantor_cit_st_zip", "guarantor_phone_num", "guarantor_work_num", "guarantor_ssn", "name_test", "club_account", "with_another_agency", "bad_address", "bad_home_num", "bad_work_num", "name_relative", "address_relative", "phone_num_relative", "name_friend", "phone_num_friend", "source_code", "contract_date", "contract_expir_date", "name_of_contract", "term_of_contract", "cash_price_of_contract", "finance_percentage", "amount_of_finance_charge", "sales_tax_percentage", "amount_of_sales_tax", "total_of_sale", "down_payment", "financed_amount", "number_of_payments", "amount_of_payment", "remaining_num_of_payments", "total_of_all_payments", "first_payment_due_date", "next_payment_due_date", "method_of_payment", "remaining_bal_on_contract", "current_paymts_due", "deliq_1to10_day_due", "deliq_11_to30_days_due", "deliq_30to60_days_due", "deliq_61to90_days_due", "deliq_90to120_days_due", "over_120_days", "total_paymt_due", "late_fees_owed", "return_fees_owed", "service_fees_owed", "total_amt_due_now", "payoff_amt", "interest_saved", "total_payoff_amt", "method_of_last_paymt_recd", "total_amt_of_last_payment", "date_of_last_paymt", "amt_applied_to_paymts", "amt_applied_to_late_fees", "amt_applied_to_return_fees", "amt_applied_to_service_fees", "days_deliq_when_recieved", "num_of_days_late", "billing_cycle", "renewal_date", "renewal_amt", "special_charg_discript", "num_of_times_to_charge", "num_of_times_charged", "first_date_to_charge", "next_date_to_charge", "bank_name", "bank_address", "bank_city", "bank_state", "bank_zip", "routing_num", "bank_acc_num", "monthly_draft_amt", "prenote_complete", "monthly_eft_dues", "monthly_pb_dues", "mail_invoice", "credit_card_name", "credit_card_tye", "credit_card_num", "old_credit_card_num", "monthly_cc_draft", "credit_card_exprtion_date", "last_name_on_back_acct", "first_name_on_bank_acct", "mi_on_bank_acct", "last_name_on_credit_card", "first_name_on_credit_card", "mi_on_credit_card", "num_of_lat_notices_maild", "date_of_last_late_notice", "number_of_pb_mailed", "date_of_last_pb", "date_1st_renewal_mailed", "date_2nd_renewal_mailed", "late_fee_waived", "date_of_collection_letter", "return_fee_waived", "service_fee_waived", "payments_waived", "reason_for_cancel", "reactivate_date", "last_debit_date", "date_of_court_hearing", "member_since", "original_contrat_date", "rewrite_date", "total_money_paid_to_date", "fist_sale_person", "sec_sale_person", "commision", "cancel_acc_after_date", "purge_from_sys", "rewitten_by", "promise_to_pay_date", "late_fee_charge", "service_fee_charge", "return_fee_charge", "acct_created_by", "date_account_entered", "num_of_outgoin_calls", "num_of_incoming_calls", "reason_for_freeze", "effective_date_freeze", "extend_expire_date", "misc_field", "notes_line_one", "notes_line_two", "contract_on_hold", "date_status_changed", "old_account_num", "id_picture", "date_of_last_visit", "number_of_visits", "personal_trainer", "total_princ_plus_fin_due", "bacode_printed", "date_barode_printed", "num_times_barcode_printed", "date_of_return", "reason_returned", "amount_of_return", "due_date_of_return", "amt_of_special_chrg", "email_address", "club_database", "credit", "change_date", "create_date", "previous_status", "commish_paid", "night_mod_time", "map_member_ref_num", "map_num_of_credits", "map_credit_amt", "map_credit_total", "contract_type", "ebcs_status", "ebcs_status_date", "service_1_yn", "service_2_yn", "service_3_yn", "service_4_yn", "service_5_yn", "service_6_yn", "service_7_yn", "service_8_yn", "service_9_yn", "service_10_yn", "all_days_hours_yn", "monday_yn", "tuesday_yn", "wednesday_yn", "thursday_yn", "friday_yn", "saturday_yn", "sunday_yn", "monday_start_time", "monday_end_time", "tuesday_start_time", "tuesday_end_time", "wednesday_start_time", "wednesday_end_time", "thursday_start_time", "thursday_end_time", "friday_start_time", "friday_end_time", "saturday_start_time", "saturday_end_time", "sunday_start_time", "sunday_end_time", "cur_mod_number", "minor_yn", "drivers_license", "married_single", "guarantor_relationship", "guarantor_dob", "auto_renewal", "contract_edit_yn", "initiation_fee", "cash_price_edit_yn", "renewal_term", "department", "cell_phone", "relation_relative", "relation", "source_other", "referred_by", "cancel_other", "prorate_dues", "prorate_maint_fee", "maint_fee", "maint_cycle", "maint_month", "maint_day", "preenroll_yn", "sales_tax_DP", "amount_of_payment_club", "total_of_all_payments_club", "prorate_dues_club", "initiation_fee_club", "prorate_maint_fee_club", "reciprocity_yn" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."card_num"}, {ml r."joint_accont_num"}, {ml r."account_status"}, {ml r."first_name"}, {ml r."last_name"}, {ml r."mi"}, {ml r."generation"}, {ml r."street_num"}, {ml r."street_name"}, {ml r."second_line_address"}, {ml r."city"}, {ml r."state"}, {ml r."zip"}, {ml r."home_phone"}, {ml r."work_phone"}, {ml r."work_ext"}, {ml r."emp_name"}, {ml r."emp_street_num"}, {ml r."emp_street_name"}, {ml r."emp_sec_line_addr"}, {ml r."emp_city"}, {ml r."emp_state"}, {ml r."emp_zip"}, {ml r."ssn"}, {ml r."dob"}, {ml r."month_of_dob"}, {ml r."sex"}, {ml r."height"}, {ml r."weight"}, {ml r."eye_color"}, {ml r."hair_color"}, {ml r."guarantor_last_name"}, {ml r."guarantor_first_name"}, {ml r."guarantor_mi"}, {ml r."guarantor_address"}, {ml r."guarantor_cit_st_zip"}, {ml r."guarantor_phone_num"}, {ml r."guarantor_work_num"}, {ml r."guarantor_ssn"}, {ml r."name_test"}, {ml r."club_account"}, {ml r."with_another_agency"}, {ml r."bad_address"}, {ml r."bad_home_num"}, {ml r."bad_work_num"}, {ml r."name_relative"}, {ml r."address_relative"}, {ml r."phone_num_relative"}, {ml r."name_friend"}, {ml r."phone_num_friend"}, {ml r."source_code"}, {ml r."contract_date"}, {ml r."contract_expir_date"}, {ml r."name_of_contract"}, {ml r."term_of_contract"}, {ml r."cash_price_of_contract"}, {ml r."finance_percentage"}, {ml r."amount_of_finance_charge"}, {ml r."sales_tax_percentage"}, {ml r."amount_of_sales_tax"}, {ml r."total_of_sale"}, {ml r."down_payment"}, {ml r."financed_amount"}, {ml r."number_of_payments"}, {ml r."amount_of_payment"}, {ml r."remaining_num_of_payments"}, {ml r."total_of_all_payments"}, {ml r."first_payment_due_date"}, {ml r."next_payment_due_date"}, {ml r."method_of_payment"}, {ml r."remaining_bal_on_contract"}, {ml r."current_paymts_due"}, {ml r."deliq_1to10_day_due"}, {ml r."deliq_11_to30_days_due"}, {ml r."deliq_30to60_days_due"}, {ml r."deliq_61to90_days_due"}, {ml r."deliq_90to120_days_due"}, {ml r."over_120_days"}, {ml r."total_paymt_due"}, {ml r."late_fees_owed"}, {ml r."return_fees_owed"}, {ml r."service_fees_owed"}, {ml r."total_amt_due_now"}, {ml r."payoff_amt"}, {ml r."interest_saved"}, {ml r."total_payoff_amt"}, {ml r."method_of_last_paymt_recd"}, {ml r."total_amt_of_last_payment"}, {ml r."date_of_last_paymt"}, {ml r."amt_applied_to_paymts"}, {ml r."amt_applied_to_late_fees"}, {ml r."amt_applied_to_return_fees"}, {ml r."amt_applied_to_service_fees"}, {ml r."days_deliq_when_recieved"}, {ml r."num_of_days_late"}, {ml r."billing_cycle"}, {ml r."renewal_date"}, {ml r."renewal_amt"}, {ml r."special_charg_discript"}, {ml r."num_of_times_to_charge"}, {ml r."num_of_times_charged"}, {ml r."first_date_to_charge"}, {ml r."next_date_to_charge"}, {ml r."bank_name"}, {ml r."bank_address"}, {ml r."bank_city"}, {ml r."bank_state"}, {ml r."bank_zip"}, {ml r."routing_num"}, {ml r."bank_acc_num"}, {ml r."monthly_draft_amt"}, {ml r."prenote_complete"}, {ml r."monthly_eft_dues"}, {ml r."monthly_pb_dues"}, {ml r."mail_invoice"}, {ml r."credit_card_name"}, {ml r."credit_card_tye"}, {ml r."credit_card_num"}, {ml r."old_credit_card_num"}, {ml r."monthly_cc_draft"}, {ml r."credit_card_exprtion_date"}, {ml r."last_name_on_back_acct"}, {ml r."first_name_on_bank_acct"}, {ml r."mi_on_bank_acct"}, {ml r."last_name_on_credit_card"}, {ml r."first_name_on_credit_card"}, {ml r."mi_on_credit_card"}, {ml r."num_of_lat_notices_maild"}, {ml r."date_of_last_late_notice"}, {ml r."number_of_pb_mailed"}, {ml r."date_of_last_pb"}, {ml r."date_1st_renewal_mailed"}, {ml r."date_2nd_renewal_mailed"}, {ml r."late_fee_waived"}, {ml r."date_of_collection_letter"}, {ml r."return_fee_waived"}, {ml r."service_fee_waived"}, {ml r."payments_waived"}, {ml r."reason_for_cancel"}, {ml r."reactivate_date"}, {ml r."last_debit_date"}, {ml r."date_of_court_hearing"}, {ml r."member_since"}, {ml r."original_contrat_date"}, {ml r."rewrite_date"}, {ml r."total_money_paid_to_date"}, {ml r."fist_sale_person"}, {ml r."sec_sale_person"}, {ml r."commision"}, {ml r."cancel_acc_after_date"}, {ml r."purge_from_sys"}, {ml r."rewitten_by"}, {ml r."promise_to_pay_date"}, {ml r."late_fee_charge"}, {ml r."service_fee_charge"}, {ml r."return_fee_charge"}, {ml r."acct_created_by"}, {ml r."date_account_entered"}, {ml r."num_of_outgoin_calls"}, {ml r."num_of_incoming_calls"}, {ml r."reason_for_freeze"}, {ml r."effective_date_freeze"}, {ml r."extend_expire_date"}, {ml r."misc_field"}, {ml r."notes_line_one"}, {ml r."notes_line_two"}, {ml r."contract_on_hold"}, {ml r."date_status_changed"}, {ml r."old_account_num"}, {ml r."id_picture"}, {ml r."date_of_last_visit"}, {ml r."number_of_visits"}, {ml r."personal_trainer"}, {ml r."total_princ_plus_fin_due"}, {ml r."bacode_printed"}, {ml r."date_barode_printed"}, {ml r."num_times_barcode_printed"}, {ml r."date_of_return"}, {ml r."reason_returned"}, {ml r."amount_of_return"}, {ml r."due_date_of_return"}, {ml r."amt_of_special_chrg"}, {ml r."email_address"}, {ml r."club_database"}, {ml r."credit"}, {ml r."change_date"}, {ml r."create_date"}, {ml r."previous_status"}, {ml r."commish_paid"}, {ml r."night_mod_time"}, {ml r."map_member_ref_num"}, {ml r."map_num_of_credits"}, {ml r."map_credit_amt"}, {ml r."map_credit_total"}, {ml r."contract_type"}, {ml r."ebcs_status"}, {ml r."ebcs_status_date"}, {ml r."service_1_yn"}, {ml r."service_2_yn"}, {ml r."service_3_yn"}, {ml r."service_4_yn"}, {ml r."service_5_yn"}, {ml r."service_6_yn"}, {ml r."service_7_yn"}, {ml r."service_8_yn"}, {ml r."service_9_yn"}, {ml r."service_10_yn"}, {ml r."all_days_hours_yn"}, {ml r."monday_yn"}, {ml r."tuesday_yn"}, {ml r."wednesday_yn"}, {ml r."thursday_yn"}, {ml r."friday_yn"}, {ml r."saturday_yn"}, {ml r."sunday_yn"}, {ml r."monday_start_time"}, {ml r."monday_end_time"}, {ml r."tuesday_start_time"}, {ml r."tuesday_end_time"}, {ml r."wednesday_start_time"}, {ml r."wednesday_end_time"}, {ml r."thursday_start_time"}, {ml r."thursday_end_time"}, {ml r."friday_start_time"}, {ml r."friday_end_time"}, {ml r."saturday_start_time"}, {ml r."saturday_end_time"}, {ml r."sunday_start_time"}, {ml r."sunday_end_time"}, {ml r."cur_mod_number"}, {ml r."minor_yn"}, {ml r."drivers_license"}, {ml r."married_single"}, {ml r."guarantor_relationship"}, {ml r."guarantor_dob"}, {ml r."auto_renewal"}, {ml r."contract_edit_yn"}, {ml r."initiation_fee"}, {ml r."cash_price_edit_yn"}, {ml r."renewal_term"}, {ml r."department"}, {ml r."cell_phone"}, {ml r."relation_relative"}, {ml r."relation"}, {ml r."source_other"}, {ml r."referred_by"}, {ml r."cancel_other"}, {ml r."prorate_dues"}, {ml r."prorate_maint_fee"}, {ml r."maint_fee"}, {ml r."maint_cycle"}, {ml r."maint_month"}, {ml r."maint_day"}, {ml r."preenroll_yn"}, {ml r."sales_tax_DP"}, {ml r."amount_of_payment_club"}, {ml r."total_of_all_payments_club"}, {ml r."prorate_dues_club"}, {ml r."initiation_fee_club"}, {ml r."prorate_maint_fee_club"}, {ml r."reciprocity_yn"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_temp_changes', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."ebcs_temp_changes" SET "card_num" = {ml r."card_num"}, "joint_accont_num" = {ml r."joint_accont_num"}, "account_status" = {ml r."account_status"}, "first_name" = {ml r."first_name"}, "last_name" = {ml r."last_name"}, "mi" = {ml r."mi"}, "generation" = {ml r."generation"}, "street_num" = {ml r."street_num"}, "street_name" = {ml r."street_name"}, "second_line_address" = {ml r."second_line_address"}, "city" = {ml r."city"}, "state" = {ml r."state"}, "zip" = {ml r."zip"}, "home_phone" = {ml r."home_phone"}, "work_phone" = {ml r."work_phone"}, "work_ext" = {ml r."work_ext"}, "emp_name" = {ml r."emp_name"}, "emp_street_num" = {ml r."emp_street_num"}, "emp_street_name" = {ml r."emp_street_name"}, "emp_sec_line_addr" = {ml r."emp_sec_line_addr"}, "emp_city" = {ml r."emp_city"}, "emp_state" = {ml r."emp_state"}, "emp_zip" = {ml r."emp_zip"}, "ssn" = {ml r."ssn"}, "dob" = {ml r."dob"}, "month_of_dob" = {ml r."month_of_dob"}, "sex" = {ml r."sex"}, "height" = {ml r."height"}, "weight" = {ml r."weight"}, "eye_color" = {ml r."eye_color"}, "hair_color" = {ml r."hair_color"}, "guarantor_last_name" = {ml r."guarantor_last_name"}, "guarantor_first_name" = {ml r."guarantor_first_name"}, "guarantor_mi" = {ml r."guarantor_mi"}, "guarantor_address" = {ml r."guarantor_address"}, "guarantor_cit_st_zip" = {ml r."guarantor_cit_st_zip"}, "guarantor_phone_num" = {ml r."guarantor_phone_num"}, "guarantor_work_num" = {ml r."guarantor_work_num"}, "guarantor_ssn" = {ml r."guarantor_ssn"}, "name_test" = {ml r."name_test"}, "club_account" = {ml r."club_account"}, "with_another_agency" = {ml r."with_another_agency"}, "bad_address" = {ml r."bad_address"}, "bad_home_num" = {ml r."bad_home_num"}, "bad_work_num" = {ml r."bad_work_num"}, "name_relative" = {ml r."name_relative"}, "address_relative" = {ml r."address_relative"}, "phone_num_relative" = {ml r."phone_num_relative"}, "name_friend" = {ml r."name_friend"}, "phone_num_friend" = {ml r."phone_num_friend"}, "source_code" = {ml r."source_code"}, "contract_date" = {ml r."contract_date"}, "contract_expir_date" = {ml r."contract_expir_date"}, "name_of_contract" = {ml r."name_of_contract"}, "term_of_contract" = {ml r."term_of_contract"}, "cash_price_of_contract" = {ml r."cash_price_of_contract"}, "finance_percentage" = {ml r."finance_percentage"}, "amount_of_finance_charge" = {ml r."amount_of_finance_charge"}, "sales_tax_percentage" = {ml r."sales_tax_percentage"}, "amount_of_sales_tax" = {ml r."amount_of_sales_tax"}, "total_of_sale" = {ml r."total_of_sale"}, "down_payment" = {ml r."down_payment"}, "financed_amount" = {ml r."financed_amount"}, "number_of_payments" = {ml r."number_of_payments"}, "amount_of_payment" = {ml r."amount_of_payment"}, "remaining_num_of_payments" = {ml r."remaining_num_of_payments"}, "total_of_all_payments" = {ml r."total_of_all_payments"}, "first_payment_due_date" = {ml r."first_payment_due_date"}, "next_payment_due_date" = {ml r."next_payment_due_date"}, "method_of_payment" = {ml r."method_of_payment"}, "remaining_bal_on_contract" = {ml r."remaining_bal_on_contract"}, "current_paymts_due" = {ml r."current_paymts_due"}, "deliq_1to10_day_due" = {ml r."deliq_1to10_day_due"}, "deliq_11_to30_days_due" = {ml r."deliq_11_to30_days_due"}, "deliq_30to60_days_due" = {ml r."deliq_30to60_days_due"}, "deliq_61to90_days_due" = {ml r."deliq_61to90_days_due"}, "deliq_90to120_days_due" = {ml r."deliq_90to120_days_due"}, "over_120_days" = {ml r."over_120_days"}, "total_paymt_due" = {ml r."total_paymt_due"}, "late_fees_owed" = {ml r."late_fees_owed"}, "return_fees_owed" = {ml r."return_fees_owed"}, "service_fees_owed" = {ml r."service_fees_owed"}, "total_amt_due_now" = {ml r."total_amt_due_now"}, "payoff_amt" = {ml r."payoff_amt"}, "interest_saved" = {ml r."interest_saved"}, "total_payoff_amt" = {ml r."total_payoff_amt"}, "method_of_last_paymt_recd" = {ml r."method_of_last_paymt_recd"}, "total_amt_of_last_payment" = {ml r."total_amt_of_last_payment"}, "date_of_last_paymt" = {ml r."date_of_last_paymt"}, "amt_applied_to_paymts" = {ml r."amt_applied_to_paymts"}, "amt_applied_to_late_fees" = {ml r."amt_applied_to_late_fees"}, "amt_applied_to_return_fees" = {ml r."amt_applied_to_return_fees"}, "amt_applied_to_service_fees" = {ml r."amt_applied_to_service_fees"}, "days_deliq_when_recieved" = {ml r."days_deliq_when_recieved"}, "num_of_days_late" = {ml r."num_of_days_late"}, "billing_cycle" = {ml r."billing_cycle"}, "renewal_date" = {ml r."renewal_date"}, "renewal_amt" = {ml r."renewal_amt"}, "special_charg_discript" = {ml r."special_charg_discript"}, "num_of_times_to_charge" = {ml r."num_of_times_to_charge"}, "num_of_times_charged" = {ml r."num_of_times_charged"}, "first_date_to_charge" = {ml r."first_date_to_charge"}, "next_date_to_charge" = {ml r."next_date_to_charge"}, "bank_name" = {ml r."bank_name"}, "bank_address" = {ml r."bank_address"}, "bank_city" = {ml r."bank_city"}, "bank_state" = {ml r."bank_state"}, "bank_zip" = {ml r."bank_zip"}, "routing_num" = {ml r."routing_num"}, "bank_acc_num" = {ml r."bank_acc_num"}, "monthly_draft_amt" = {ml r."monthly_draft_amt"}, "prenote_complete" = {ml r."prenote_complete"}, "monthly_eft_dues" = {ml r."monthly_eft_dues"}, "monthly_pb_dues" = {ml r."monthly_pb_dues"}, "mail_invoice" = {ml r."mail_invoice"}, "credit_card_name" = {ml r."credit_card_name"}, "credit_card_tye" = {ml r."credit_card_tye"}, "credit_card_num" = {ml r."credit_card_num"}, "old_credit_card_num" = {ml r."old_credit_card_num"}, "monthly_cc_draft" = {ml r."monthly_cc_draft"}, "credit_card_exprtion_date" = {ml r."credit_card_exprtion_date"}, "last_name_on_back_acct" = {ml r."last_name_on_back_acct"}, "first_name_on_bank_acct" = {ml r."first_name_on_bank_acct"}, "mi_on_bank_acct" = {ml r."mi_on_bank_acct"}, "last_name_on_credit_card" = {ml r."last_name_on_credit_card"}, "first_name_on_credit_card" = {ml r."first_name_on_credit_card"}, "mi_on_credit_card" = {ml r."mi_on_credit_card"}, "num_of_lat_notices_maild" = {ml r."num_of_lat_notices_maild"}, "date_of_last_late_notice" = {ml r."date_of_last_late_notice"}, "number_of_pb_mailed" = {ml r."number_of_pb_mailed"}, "date_of_last_pb" = {ml r."date_of_last_pb"}, "date_1st_renewal_mailed" = {ml r."date_1st_renewal_mailed"}, "date_2nd_renewal_mailed" = {ml r."date_2nd_renewal_mailed"}, "late_fee_waived" = {ml r."late_fee_waived"}, "date_of_collection_letter" = {ml r."date_of_collection_letter"}, "return_fee_waived" = {ml r."return_fee_waived"}, "service_fee_waived" = {ml r."service_fee_waived"}, "payments_waived" = {ml r."payments_waived"}, "reason_for_cancel" = {ml r."reason_for_cancel"}, "reactivate_date" = {ml r."reactivate_date"}, "last_debit_date" = {ml r."last_debit_date"}, "date_of_court_hearing" = {ml r."date_of_court_hearing"}, "member_since" = {ml r."member_since"}, "original_contrat_date" = {ml r."original_contrat_date"}, "rewrite_date" = {ml r."rewrite_date"}, "total_money_paid_to_date" = {ml r."total_money_paid_to_date"}, "fist_sale_person" = {ml r."fist_sale_person"}, "sec_sale_person" = {ml r."sec_sale_person"}, "commision" = {ml r."commision"}, "cancel_acc_after_date" = {ml r."cancel_acc_after_date"}, "purge_from_sys" = {ml r."purge_from_sys"}, "rewitten_by" = {ml r."rewitten_by"}, "promise_to_pay_date" = {ml r."promise_to_pay_date"}, "late_fee_charge" = {ml r."late_fee_charge"}, "service_fee_charge" = {ml r."service_fee_charge"}, "return_fee_charge" = {ml r."return_fee_charge"}, "acct_created_by" = {ml r."acct_created_by"}, "date_account_entered" = {ml r."date_account_entered"}, "num_of_outgoin_calls" = {ml r."num_of_outgoin_calls"}, "num_of_incoming_calls" = {ml r."num_of_incoming_calls"}, "reason_for_freeze" = {ml r."reason_for_freeze"}, "effective_date_freeze" = {ml r."effective_date_freeze"}, "extend_expire_date" = {ml r."extend_expire_date"}, "misc_field" = {ml r."misc_field"}, "notes_line_one" = {ml r."notes_line_one"}, "notes_line_two" = {ml r."notes_line_two"}, "contract_on_hold" = {ml r."contract_on_hold"}, "date_status_changed" = {ml r."date_status_changed"}, "old_account_num" = {ml r."old_account_num"}, "id_picture" = {ml r."id_picture"}, "date_of_last_visit" = {ml r."date_of_last_visit"}, "number_of_visits" = {ml r."number_of_visits"}, "personal_trainer" = {ml r."personal_trainer"}, "total_princ_plus_fin_due" = {ml r."total_princ_plus_fin_due"}, "bacode_printed" = {ml r."bacode_printed"}, "date_barode_printed" = {ml r."date_barode_printed"}, "num_times_barcode_printed" = {ml r."num_times_barcode_printed"}, "date_of_return" = {ml r."date_of_return"}, "reason_returned" = {ml r."reason_returned"}, "amount_of_return" = {ml r."amount_of_return"}, "due_date_of_return" = {ml r."due_date_of_return"}, "amt_of_special_chrg" = {ml r."amt_of_special_chrg"}, "email_address" = {ml r."email_address"}, "club_database" = {ml r."club_database"}, "credit" = {ml r."credit"}, "change_date" = {ml r."change_date"}, "create_date" = {ml r."create_date"}, "previous_status" = {ml r."previous_status"}, "commish_paid" = {ml r."commish_paid"}, "night_mod_time" = {ml r."night_mod_time"}, "map_member_ref_num" = {ml r."map_member_ref_num"}, "map_num_of_crEdits" = {ml r."map_num_of_credits"}, "map_credit_amt" = {ml r."map_credit_amt"}, "map_credit_total" = {ml r."map_credit_total"}, "contract_type" = {ml r."contract_type"}, "ebcs_status" = {ml r."ebcs_status"}, "ebcs_status_date" = {ml r."ebcs_status_date"}, "service_1_yn" = {ml r."service_1_yn"}, "service_2_yn" = {ml r."service_2_yn"}, "service_3_yn" = {ml r."service_3_yn"}, "service_4_yn" = {ml r."service_4_yn"}, "service_5_yn" = {ml r."service_5_yn"}, "service_6_yn" = {ml r."service_6_yn"}, "service_7_yn" = {ml r."service_7_yn"}, "service_8_yn" = {ml r."service_8_yn"}, "service_9_yn" = {ml r."service_9_yn"}, "service_10_yn" = {ml r."service_10_yn"}, "all_days_hours_yn" = {ml r."all_days_hours_yn"}, "monday_yn" = {ml r."monday_yn"}, "tuesday_yn" = {ml r."tuesday_yn"}, "wednesday_yn" = {ml r."wednesday_yn"}, "thursday_yn" = {ml r."thursday_yn"}, "friday_yn" = {ml r."friday_yn"}, "saturday_yn" = {ml r."saturday_yn"}, "sunday_yn" = {ml r."sunday_yn"}, "monday_start_time" = {ml r."monday_start_time"}, "monday_end_time" = {ml r."monday_end_time"}, "tuesday_start_time" = {ml r."tuesday_start_time"}, "tuesday_end_time" = {ml r."tuesday_end_time"}, "wednesday_start_time" = {ml r."wednesday_start_time"}, "wednesday_end_time" = {ml r."wednesday_end_time"}, "thursday_start_time" = {ml r."thursday_start_time"}, "thursday_end_time" = {ml r."thursday_end_time"}, "friday_start_time" = {ml r."friday_start_time"}, "friday_end_time" = {ml r."friday_end_time"}, "saturday_start_time" = {ml r."saturday_start_time"}, "saturday_end_time" = {ml r."saturday_end_time"}, "sunday_start_time" = {ml r."sunday_start_time"}, "sunday_end_time" = {ml r."sunday_end_time"}, "cur_mod_number" = {ml r."cur_mod_number"}, "minor_yn" = {ml r."minor_yn"}, "drivers_license" = {ml r."drivers_license"}, "married_single" = {ml r."married_single"}, "guarantor_relationship" = {ml r."guarantor_relationship"}, "guarantor_dob" = {ml r."guarantor_dob"}, "auto_renewal" = {ml r."auto_renewal"}, "contract_edit_yn" = {ml r."contract_edit_yn"}, "initiation_fee" = {ml r."initiation_fee"}, "cash_price_edit_yn" = {ml r."cash_price_edit_yn"}, "renewal_term" = {ml r."renewal_term"}, "department" = {ml r."department"}, "cell_phone" = {ml r."cell_phone"}, "relation_relative" = {ml r."relation_relative"}, "relation" = {ml r."relation"}, "source_other" = {ml r."source_other"}, "referred_by" = {ml r."referred_by"}, "cancel_other" = {ml r."cancel_other"}, "prorate_dues" = {ml r."prorate_dues"}, "prorate_maint_fee" = {ml r."prorate_maint_fee"}, "maint_fee" = {ml r."maint_fee"}, "maint_cycle" = {ml r."maint_cycle"}, "maint_month" = {ml r."maint_month"}, "maint_day" = {ml r."maint_day"}, "preenroll_yn" = {ml r."preenroll_yn"}, "sales_tax_DP" = {ml r."sales_tax_DP"}, "amount_of_payment_club" = {ml r."amount_of_payment_club"}, "total_of_all_payments_club" = {ml r."total_of_all_payments_club"}, "prorate_dues_club" = {ml r."prorate_dues_club"}, "initiation_fee_club" = {ml r."initiation_fee_club"}, "prorate_maint_fee_club" = {ml r."prorate_maint_fee_club"}, "reciprocity_yn" = {ml r."reciprocity_yn"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_special_charges', 'download_cursor', 'sql', ' SELECT ebcs_special_charges.account_num, ebcs_special_charges.client_num, ebcs_special_charges.mod_number, ebcs_special_charges.seq, ebcs_special_charges.special_charg_discript, ebcs_special_charges.amt_of_special_chrg, ebcs_special_charges.num_of_times_to_charge, ebcs_special_charges.first_date_to_charge, ebcs_special_charges.next_date_to_charge, ebcs_special_charges.charge_creation_date FROM DBA.ebcs_special_charges ebcs_special_charges WHERE ebcs_special_charges.last_modified > @last_download AND ( ebcs_special_charges.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE ebcs_special_charges.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_special_charges', 'download_delete_cursor', 'sql', ' SELECT DELETED_ebcs_special_charges.account_num, DELETED_ebcs_special_charges.client_num, DELETED_ebcs_special_charges.mod_number, DELETED_ebcs_special_charges.seq FROM DBA.DELETED_ebcs_special_charges DELETED_ebcs_special_charges, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs_special_charges.deleted_on > @last_download AND DELETED_ebcs_special_charges.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_special_charges', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."ebcs_special_charges" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} AND "mod_number" = {ml r."mod_number"} AND "seq" = {ml r."seq"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_special_charges', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."ebcs_special_charges" ( "account_num", "client_num", "mod_number", "seq", "special_charg_discript", "amt_of_special_chrg", "num_of_times_to_charge", "first_date_to_charge", "next_date_to_charge", "charge_creation_date" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."mod_number"}, {ml r."seq"}, {ml r."special_charg_discript"}, {ml r."amt_of_special_chrg"}, {ml r."num_of_times_to_charge"}, {ml r."first_date_to_charge"}, {ml r."next_date_to_charge"}, {ml r."charge_creation_date"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_special_charges', 'upload_update', 'sql', ' /* Update the row in the consolidated database. */ UPDATE "DBA"."ebcs_special_charges" SET "special_charg_discript" = {ml r."special_charg_discript"}, "amt_of_special_chrg" = {ml r."amt_of_special_chrg"}, "num_of_times_to_charge" = {ml r."num_of_times_to_charge"}, "first_date_to_charge" = {ml r."first_date_to_charge"}, "next_date_to_charge" = {ml r."next_date_to_charge"}, "charge_creation_date" = {ml r."charge_creation_date"} WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} AND "mod_number" = {ml r."mod_number"} AND "seq" = {ml r."seq"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_changes', 'download_cursor', 'sql', ' SELECT ebcs_changes.account_num, ebcs_changes.client_num, ebcs_changes.mod_number, ebcs_changes.column_name FROM DBA.ebcs_changes ebcs_changes WHERE ebcs_changes.last_modified > @last_download AND ( ebcs_changes.client_num = @ml_username OR EXISTS ( SELECT * FROM DBA.EBCS_Clients_PC EBCS_Clients_PC, DBA.EBCS_Clients EBCS_Clients WHERE ebcs_changes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = EBCS_Clients.client_num AND EBCS_Clients.client_num = @ml_username AND EBCS_Clients.type = ''A'' ) ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_changes', 'download_delete_cursor', 'sql', 'SELECT DELETED_ebcs_changes.account_num, DELETED_ebcs_changes.client_num, DELETED_ebcs_changes.mod_number, DELETED_ebcs_changes.column_name FROM DBA.DELETED_ebcs_changes DELETED_ebcs_changes, DBA.EBCS_Clients_PC EBCS_Clients_PC WHERE DELETED_ebcs_changes.deleted_on > @last_download AND DELETED_ebcs_changes.client_num = EBCS_Clients_PC.child_num AND EBCS_Clients_PC.parent_num = @ml_username '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_changes', 'upload_delete', 'sql', ' /* Delete the row from the consolidated database. */ DELETE FROM "DBA"."ebcs_changes" WHERE "account_num" = {ml r."account_num"} AND "client_num" = {ml r."client_num"} AND "mod_number" = {ml r."mod_number"} AND "column_name" = {ml r."column_name"} '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_changes', 'upload_insert', 'sql', ' /* Insert the row into the consolidated database. */ INSERT INTO "DBA"."ebcs_changes" ( "account_num", "client_num", "mod_number", "column_name" ) VALUES ( {ml r."account_num"}, {ml r."client_num"}, {ml r."mod_number"}, {ml r."column_name"} ) '); call ml_admin.ml_add_lang_table_script( 'v12_3', 'ebcs_changes', 'upload_update', 'sql', '--{ml_ignore}'); call ml_admin.ml_add_lang_connection_script( 'v12_3', 'begin_download', 'sql', ' CALL ml_begin_download_12 ( {ml s.last_download}, {ml s.username} ) '); call ml_admin.ml_add_lang_connection_script( 'v12_3', 'end_upload', 'sql', ' CALL ml_end_upload_12 ( {ml s.username} ) '); call ml_admin.ml_add_lang_connection_script( 'v12_3', 'begin_upload', 'sql', ' CALL ml_begin_upload_12 ({ml s.username}) '); call ml_admin.ml_add_lang_connection_script( 'v12_3', 'begin_publication', 'sql', ' CALL ml_begin_publication_12 ( {ml s.generation_number}, {ml s.username}, {ml s.publication_name}, {ml s.last_publication_upload}, {ml s.last_publication_download} ) '); call ml_admin.ml_add_lang_connection_script( 'v12_3', 'report_error', 'sql', ' INSERT INTO sync_error_log( action_code , error_code , error_message , user_name , table_name , error_type ) VALUES ( {ml s.action_code} , {ml s.error_code} , {ml s.error_message} , {ml s.username} , {ml s.table} , ''SYNC'' ) '); call ml_admin.ml_add_lang_connection_script( 'v12_3', 'report_odbc_error', 'sql', ' INSERT INTO sync_error_log( action_code , error_code , error_message , user_name , table_name , error_type ) VALUES ( {ml s.action_code} , {ml s.odbc_state} , {ml s.error_message} , {ml s.username} , {ml s.table} , ''ODBC'' ) ');