兰州数据处理

--第一步
update OperationLog set OperateDate='2000-01-01 00:00:00' where Operator='prc_TelemetryDataByDay'

--第二步
truncate table Telemetry_staticsByDay

--第三步
exec prc_TelemetryDataByDay

--第四步
update OperationLog set OperateDate='2000-01-01 00:00:00' where Operator='prc_TelemetryDataByDay'
--第五步
truncate table TelemetryAudit
truncate table TelemetryNotStandard


--第六步
exec prc_TelemetryNotStandardFor


--第四步,将2018年及以前的数据导到RemoteDetection2018表
SELECT * INTO RemoteDetection2018 FROM RemoteDetection WHERE PASSDATETIME<'2019-01-01 00:00:00'

SELECT * INTO RemoteDetection2020 FROM RemoteDetection

--第五步,移除2018年之前的数据
Delete RemoteDetection WHERE PASSDATETIME<'2019-01-01 00:00:00'

猜你喜欢

转载自www.cnblogs.com/luoguixin/p/12791396.html