delete from gl_balance where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from Gl_commondetail where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from Gl_commondetail where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from Gl_commonvoucher where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_controlsubj where pk_accsubj in (select pk_accsubj from bd_accsubj where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from Gl_transferdetail where pk_transfer=(select pk_transfer from gl_transfer where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from Gl_transferhistory where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from Gl_transfersort where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_detail where pk_voucher in (select pk_voucher from gl_voucher where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_transproject where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_transratedetail where pk_transrate in (select pk_transrate from GL_TRANSRATE where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_transrate where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_transprodef where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_transfer where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_dtlfreevalue where pk_detail in (select pk_detail from gl_detail where pk_voucher in (select pk_voucher from gl_voucher where pk_corp=(select pk_corp from bd_corp where unitcode='2006'))); delete from gl_verify_log where pk_detail in (select pk_detail from gl_detail where pk_voucher in (select pk_voucher from gl_voucher where pk_corp=(select pk_corp from bd_corp where unitcode='2006'))); delete from gl_verifydetail where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_verifyobj_b where pk_verifyobj in (select pk_verifyobj from gl_verifyobj where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_verifyobj where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_accountlink where pk_contrastaccount in (select pk_contrastaccount from gl_contrastaccount where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_rule_b where pk_rule in (select pk_rule from gl_rule where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_rulebind where pk_rule in (select pk_rule from gl_rule where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_rule where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_othertemp where pk_selfcorp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_reconoccursub where pk_reconcileoccur in (select pk_reconcileoccur from gl_reconcileoccur where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_reconcileoccur where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_resubjfreevalue where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_modelsetdetail where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_corpcontrastsub where pk_corpcontrast in (select pk_corpcontrast from gl_corpcontrast where pk_corp in (select pk_corp from bd_corp where unitcode='2006')); delete from gl_corpcontrast where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_corprelationsub where pk_relation is null or pk_relation in (select pk_relation from gl_corprelation where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_corprelation where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_initbuild where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_subjfreevalue where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_vchfreevalue where pk_voucher in (select pk_voucher from gl_voucher where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_cashflowcase where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_busruledetail where pk_busrule in (select pk_busrule from gl_busrule where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from gl_busrule where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_busrelation where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_subrelation where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_assdetail where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from gl_voucher where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from dap_finindex where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from dap_finmsg where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from dap_rtvouch_b where pk_voucher in ( select pk_voucher from dap_rtvouch where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from dap_rtvouch where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_accfile where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_accsubj where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_areaclass where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_calbody where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_costsubj where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_curraccout where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_custaccount where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_customer where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_deptdoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_glbook where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_glorgbook where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_invcl where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_invmandoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_jobmngfil where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_psndoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_purorg where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_salestrug where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_setunit where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_stordoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_power_vouchertype where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from pub_sysinit where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_defdoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_defquote where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_calbody where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_deptdoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_salestru where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_storvscost where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_psncl where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_psnbasdoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_psndoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_areacl where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_custbank where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_custaddr where pk_cubasdoc in (select distinct pk_cubasdoc from bd_cumandoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_cumandoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_cubasdoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_cargdoc where pk_stordoc in (select pk_stordoc from BD_STORDOC where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_stordoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_batchcode_rule where pk_invcl in (select pk_invcl from bd_invcl,bd_corp where bd_invcl.pk_corp=bd_corp.pk_corp and bd_corp.pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_invcl where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_invbindle where pk_invmandoc in (select pk_invmandoc from bd_invmandoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_invrepl where pk_invmandoc in (select pk_invmandoc from bd_invmandoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_convert where pk_invbasdoc in (select pk_invbasdoc from bd_invbasdoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_invmandoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_invbasdoc where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_batchlist where pk_produce in (select pk_produce from bd_produce where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_produce where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_abcpara where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_bdinfo where pk_defdef in (select pk_jobtype from bd_jobtype where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_jobphase where pk_jobtype in (select pk_jobtype from bd_jobtype where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_jobtype where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_jobobjpha where pk_jobmngfil in (select pk_jobmngfil from bd_jobmngfil where pk_corp=(select pk_corp from bd_corp where unitcode='2006')); delete from bd_jobmngfil where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_jobbasfil where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_setpart where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_payterm where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from sm_createcorp where pk_corp=(select pk_corp from bd_corp where unitcode='2006'); delete from bd_corp where unitcode='2006'; delete from bd_glorgbook where glorgbookcode='2006-0001'; delete from bd_glorg where glorgcode='2006'; commit;