有问题文章留言 看内容决定收费与免费
另外接收数据库质疑 勒索病毒数据恢复等项目。

打开软件提示:当前服务器时间小于已有业务最大的操作时间

【问题描述】

打开软件提示:当前服务器时间2019-1-3小于已有业务最大的操作时间2019-1-8

【问题答案】

可通过以下语句处理,执行语句前请先备份数据库
1.计算相差的时间
use issfoodv6
select datediff(day,’2019-01-08′,’2019-01-03′) –计算相差的时间,“2019-01-08”是错误时间,“2019-01-03”是要修改的时间
 
2. 将错误单据改对
declare @daydiff int, @old_date datetime
select @daydiff=-5–计算出来减去的时间
select @old_date=’2018-01-08′–错误的时间
update cybr_u_checkout_master set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date
update cybr_u_checkout_detail set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date
update cybr_u_tmp_table set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date
update cybr_u_master set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date
update cybr_u_table set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date
update cybr_u_orderdish set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date
update t_st_material_io_flow set dt_audit=dateadd(day,@daydiff,dt_audit) where convert(char(10),dt_audit,120)=@old_date
update t_st_voucher_master set dt_audit=dateadd(day,@daydiff,dt_audit) where convert(char(10),dt_audit,120)=@old_date
update t_m_deposit set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date
update t_m_pay set dt_operdate=dateadd(day,@daydiff,dt_operdate) where convert(char(10),dt_operdate,120)=@old_date



赞(0)
未经允许不得转载:思迅软件知识库 » 打开软件提示:当前服务器时间小于已有业务最大的操作时间
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址