Skip to content

Instantly share code, notes, and snippets.

@vishwasbabu
Last active September 17, 2016 07:42
Show Gist options
  • Save vishwasbabu/abb790212961ab5c2f53 to your computer and use it in GitHub Desktop.
Save vishwasbabu/abb790212961ab5c2f53 to your computer and use it in GitHub Desktop.
Delete Client with associated loans
delete from m_note;
delete from `m_loan_installment_charge`;
delete from m_loan_overdue_installment_charge;
delete from m_loan_interest_recalculation_additional_details;
delete from m_loan_transaction_repayment_schedule_mapping;
delete from m_loan_repayment_schedule;
delete from `acc_gl_journal_entry`;
delete from m_loan_charge_paid_by;
delete from m_account_transfer_transaction;
delete from m_guarantor_transaction;
delete from m_loan_transaction;
delete from `m_loan_recalculation_details`;
delete from m_loan_repayment_schedule_history;
delete from m_loan_arrears_aging;
delete from m_loan_charge;
delete from m_loan_paid_in_advance;
delete from m_account_transfer_standing_instructions_history;
delete from m_account_transfer_standing_instructions;
delete from m_account_transfer_details;
delete from m_portfolio_account_associations;
delete from m_guarantor_funding_details;
delete from m_portfolio_account_associations;
delete from m_loan_disbursement_detail;
delete from m_loan_officer_assignment_history;
delete from m_loan_reschedule_request;
delete from m_loan_term_variations;
delete from m_guarantor;
delete from m_group_client;
delete from m_loan;
delete from m_client_identifier;
delete from m_savings_account_transaction;
update m_client set default_savings_account = null;
delete from m_savings_account;
delete from m_client;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment