Skip to content

Instantly share code, notes, and snippets.

@adjam
Last active November 6, 2015 15:46
Show Gist options
  • Save adjam/3bcf17575fe051e51d1c to your computer and use it in GitHub Desktop.
Save adjam/3bcf17575fe051e51d1c to your computer and use it in GitHub Desktop.
SQL to give default chart of accounts a code that allows it to be edited. Replace 'NC' with a code that makes sense to you.
set foreign_key_checks = 0;
-- assumes 'bootstrap' chart was loaded with '01' as the code; the UI will reject this as invalid, so you need a non-numeric code
-- find/replace all occurrences of 'NC' with alphabetic code that makes sense to you.
update ca_chart_t SET FIN_COA_CD = 'NC' WHERE FIN_COA_CD = '01';
UPDATE ap_neg_pmt_rqst_aprvl_lmt_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ap_pmt_rqst_acct_chg_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ap_pmt_rqst_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ap_sum_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_doc_hdr_t SET PRCS_FIN_COA_CD= 'NC' WHERE PRCS_FIN_COA_CD= '01';
UPDATE ar_inv_doc_t SET AR_BILL_BY_COA_CD= 'NC' WHERE AR_BILL_BY_COA_CD= '01';
UPDATE ar_inv_doc_t SET PMT_FIN_COA_CD= 'NC' WHERE PMT_FIN_COA_CD= '01';
UPDATE ar_inv_dtl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_inv_itm_code_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_inv_itm_code_t SET INV_FIN_COA_CD= 'NC' WHERE INV_FIN_COA_CD= '01';
UPDATE ar_non_inv_mt SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_non_inv_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_open_inv_dtl_mt SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_open_inv_dtl_mt SET AR_BILL_BY_COA_CD= 'NC' WHERE AR_BILL_BY_COA_CD= '01';
UPDATE ar_open_inv_dtl_mt SET PRCS_FIN_COA_CD= 'NC' WHERE PRCS_FIN_COA_CD= '01';
UPDATE ar_org_acctgdflt_t SET WRITEOFF_FIN_COA_CD= 'NC' WHERE WRITEOFF_FIN_COA_CD= '01';
UPDATE ar_org_acctgdflt_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_org_acctgdflt_t SET INV_FIN_COA_CD= 'NC' WHERE INV_FIN_COA_CD= '01';
UPDATE ar_org_acctgdflt_t SET PMT_FIN_COA_CD= 'NC' WHERE PMT_FIN_COA_CD= '01';
UPDATE ar_org_option_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ar_org_option_t SET PRCS_FIN_COA_CD= 'NC' WHERE PRCS_FIN_COA_CD= '01';
UPDATE ar_writeoff_doc_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_a21_sub_acct_t SET ICR_FIN_COA_CD= 'NC' WHERE ICR_FIN_COA_CD= '01';
UPDATE ca_a21_sub_acct_t SET CST_SHR_COA_CD= 'NC' WHERE CST_SHR_COA_CD= '01';
UPDATE ca_a21_sub_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_account_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_account_t SET ENDOW_FIN_COA_CD= 'NC' WHERE ENDOW_FIN_COA_CD= '01';
UPDATE ca_acct_chg_dtl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_acct_delegate_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_chart_t SET RPTS_TO_FIN_COA_CD= 'NC' WHERE RPTS_TO_FIN_COA_CD= '01';
UPDATE ca_icr_excl_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_icr_excl_acct_t SET FIN_OBJ_COA_CD= 'NC' WHERE FIN_OBJ_COA_CD= '01';
UPDATE ca_obj_cd_chg_dtl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_obj_consoldtn_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_obj_level_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_object_code_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_object_code_t SET RPTS_TO_FIN_COA_CD= 'NC' WHERE RPTS_TO_FIN_COA_CD= '01';
UPDATE ca_org_extns_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_org_reversion_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_org_reversion_t SET BDGT_RVRSN_COA_CD= 'NC' WHERE BDGT_RVRSN_COA_CD= '01';
UPDATE ca_org_reversion_t SET CSH_RVRSNFINCOA_CD= 'NC' WHERE CSH_RVRSNFINCOA_CD= '01';
UPDATE ca_org_rtng_mdl_nm_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_org_rtng_mdl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_org_rvrsn_chg_org_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_org_rvrsn_dtl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_org_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_org_t SET ORG_PLNT_COA_CD= 'NC' WHERE ORG_PLNT_COA_CD= '01';
UPDATE ca_org_t SET CMP_PLNT_COA_CD= 'NC' WHERE CMP_PLNT_COA_CD= '01';
UPDATE ca_org_t SET RPTS_TO_FIN_COA_CD= 'NC' WHERE RPTS_TO_FIN_COA_CD= '01';
UPDATE ca_prior_yr_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_prior_yr_org_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_prior_yr_org_t SET CMP_PLNT_COA_CD= 'NC' WHERE CMP_PLNT_COA_CD= '01';
UPDATE ca_prior_yr_org_t SET RPTS_TO_FIN_COA_CD= 'NC' WHERE RPTS_TO_FIN_COA_CD= '01';
UPDATE ca_prior_yr_org_t SET ORG_PLNT_COA_CD= 'NC' WHERE ORG_PLNT_COA_CD= '01';
UPDATE ca_project_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_sub_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_sub_acct_t SET FIN_RPT_CHRT_CD= 'NC' WHERE FIN_RPT_CHRT_CD= '01';
UPDATE ca_sub_obj_cd_chg_doc_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_sub_obj_cd_chg_dtl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ca_sub_object_cd_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cb_prtg_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cg_awd_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cg_awd_org_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cg_prpsl_org_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cm_ast_payment_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cm_ast_pmt_dtl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cm_ast_retire_doc_t SET AST_RETIR_COA_CD= 'NC' WHERE AST_RETIR_COA_CD= '01';
UPDATE cm_ast_trnfr_doc_t SET ORG_OWNER_COA_CD= 'NC' WHERE ORG_OWNER_COA_CD= '01';
UPDATE cm_cptlast_doc_t SET ORG_OWNER_COA_CD= 'NC' WHERE ORG_OWNER_COA_CD= '01';
UPDATE cm_cptlast_obj_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE cm_cptlast_t SET ORG_OWNER_COA_CD= 'NC' WHERE ORG_OWNER_COA_CD= '01';
UPDATE cm_cptlast_t SET AST_RETIR_COA_CD= 'NC' WHERE AST_RETIR_COA_CD= '01';
UPDATE fp_acct_lines_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE fp_bdgt_adj_dtl_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE fp_cr_card_vndr_t SET INC_FIN_COA_CD= 'NC' WHERE INC_FIN_COA_CD= '01';
UPDATE fp_cr_card_vndr_t SET EXP_FIN_COA_CD= 'NC' WHERE EXP_FIN_COA_CD= '01';
UPDATE fp_dv_wire_chrg_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE fp_ofst_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE fp_ofst_acct_t SET FIN_OFST_COA_CD= 'NC' WHERE FIN_OFST_COA_CD= '01';
UPDATE fp_prcrmnt_acct_lines_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE fp_prcrmnt_card_dflt_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE fp_rpt_cd_t SET FIN_RPT_CHRT_CD= 'NC' WHERE FIN_RPT_CHRT_CD= '01';
UPDATE fp_sales_tax_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE fs_option_t SET UNIV_FIN_COA_CD= 'NC' WHERE UNIV_FIN_COA_CD= '01';
UPDATE fs_tax_region_t SET LIAB_ACCT_FIN_COA_CD= 'NC' WHERE LIAB_ACCT_FIN_COA_CD= '01';
UPDATE gl_acct_balances_hist_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_acct_balances_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_balance_hist_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_balance_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_encumbrance_hist_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_encumbrance_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_entry_hist_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_entry_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_id_bill_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_offset_defn_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_org_rvrsn_ctgry_amt_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_org_rvrsn_unit_wrk_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_reversal_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_sf_balances_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE gl_sf_rebuild_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ole_ap_inv_acct_chg_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ole_ap_inv_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ole_ap_inv_offset_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ole_ap_inv_sum_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE ole_dv_fp_acct_lines_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pdp_cust_prfl_t SET DFLT_COA_CD= 'NC' WHERE DFLT_COA_CD= '01';
UPDATE pur_ap_org_parm_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_po_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_po_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_po_t SET NON_INST_FND_ORG_COA_CD= 'NC' WHERE NON_INST_FND_ORG_COA_CD= '01';
UPDATE pur_po_t SET NON_INST_FND_COA_CD= 'NC' WHERE NON_INST_FND_COA_CD= '01';
UPDATE pur_rcvng_addr_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_reqs_acct_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_reqs_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_reqs_t SET NON_INST_FND_ORG_COA_CD= 'NC' WHERE NON_INST_FND_ORG_COA_CD= '01';
UPDATE pur_reqs_t SET NON_INST_FND_COA_CD= 'NC' WHERE NON_INST_FND_COA_CD= '01';
UPDATE pur_thrshld_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_vndr_contr_org_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
UPDATE pur_vndr_cust_nbr_t SET FIN_COA_CD= 'NC' WHERE FIN_COA_CD= '01';
set foreign_key_checks = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment