–先备份
CREATE TABLE aeh_file190513 AS SELECT * from aeh_file WHERE aeh09=2018 AND aeh10=6;
CREATE TABLE aah_file190513 AS SELECT * from aah_file where aah02=2018 and aah03=6; —科目余额档
CREATE TABLE tah_file190513 AS SELECT * from tah_file where tah02=2018 and tah03=6; —科目余额档
CREATE TABLE aed_file190513 AS SELECT * from aed_file where aed03=2018 and aed04=6; —科目异动码冲帐余额档
CREATE TABLE ted_file190513 AS SELECT * from ted_file where ted03=2018 and ted04=6; —科目异动码冲帐余额档
CREATE TABLE aao_file190513 AS SELECT * from aao_file where aao03=2018 and aao04=6; —部门科目余额档
CREATE TABLE tao_file190513 AS SELECT * from tao_file where tao03=2018 and tao04=6; —部门科目币别余额档
CREATE TABLE aas_file190513 AS SELECT * from aas_file where year(aas02)=2018 and month(aas02)=6; —科目每日余额档
CREATE TABLE tas_file190513 AS SELECT * from tas_file where year(tas02)=2018 and month(tas02)=6; —科目每日币别余额档
CREATE TABLE aea_file190513 AS SELECT * from aea_file where year(aea02)=2018 and month(aea02)=6; —分类帐档
CREATE TABLE aec_file190513 AS SELECT * from aec_file where year(aec02)=2018 and month(aec02)=6; —异动别分类帐档
CREATE TABLE aef_file190513 AS SELECT * from aef_file where aef03=2018 and aef04=6; —专案余额档
CREATE TABLE aeg_file190513 AS SELECT * from aeg_file where year(aeg02)=2018 and month(aeg02)=6; —专案别分类帐档
–再删除
delete from aeh_file WHERE aeh09=2018 AND aeh10=6;
delete from aah_file where aah02=2018 and aah03=6; —科目余额档
delete from tah_file where tah02=2018 and tah03=6; —科目余额档
delete from aed_file where aed03=2018 and aed04=6; —科目异动码冲帐余额档
delete from ted_file where ted03=2018 and ted04=6; —科目异动码冲帐余额档
delete from aao_file where aao03=2018 and aao04=6; —部门科目余额档
delete from tao_file where tao03=2018 and tao04=6; —部门科目币别余额档
delete from aas_file where year(aas02)=2018 and month(aas02)=6; —科目每日余额档
delete from tas_file where year(tas02)=2018 and month(tas02)=6; —科目每日币别余额档
delete from aea_file where year(aea02)=2018 and month(aea02)=6; —分类帐档
delete from aec_file where year(aec02)=2018 and month(aec02)=6; —异动别分类帐档
delete from aef_file where aef03=2018 and aef04=6; —专案余额档
delete from aeg_file where year(aeg02)=2018 and month(aeg02)=6; —专案别分类帐档
转载请注明:赫非域 » tiptop删除月末结帐数据