sql1:selectSBatchAdjustBill.fnumber单据编码,person.FNUMBER员工编码,person.Fname_l2员工姓名,casewhenSBatchAdjustBill.FBILLSTATE=0then未提交whenSBatchAdjustBill.FBILLSTATE=1then未审批whenSBatchAdjustBill.FBILLSTATE=2then审批中end审批状态,SBatchAdjustBillentry.Fid当前任职ID,SBatchAdjustBillentry.FEFFECTDATE当前任职生效日期,SAdjustEmpORelation.FEFFECTDATE当前任职开始日期,SAdjustEmpORelation.FLEFFE...
--1、新建期间临时表,将需要保留的期间数据插入--------------------------------新建期间临时表------------------------------DROPTABLETEMPTIME;createtableTEMPTIMEasSELECTfid,fnumberFROMT_BD_PeriodWHEREfperiodyear>2020;--总账1CREATETABLECASHFLOWSPLITRECORDASselect*fromT_GL_CASHFLOWSPLITRECORDwhereFVOUCHERIDin(selectfidfromT_GL_Voucherwherefperiodidin(selectfidfromtemptime));--drop原表droptableT_GL_C...