从 SQL Server 2000 传输到 2008 r2 后更改的日期
我将数据从旧的 SQL Server 2000 (SBS 2003) 传输到另一台运行 SQL Server 2008 r2(Server 2008 r2 标准)的服务器。 数据已传输,但现在不同表中的日期混乱了。 为了正确传输日期列,我需要遵循特殊程序吗?如果是内存服务器,则日期列被视为偏移量。 有人知道如何纠正这个问题吗? 我尝试查找,但找不到答案。也许我只是没有想到正确的关键词。
谢谢!
编辑:我所说的混乱是指原始日期(来自旧服务器)是2011-05-08,新日期(来自新服务器)是2010-04-14。我试图看看他移动的所有日期是否有一个共同的偏移量,但找不到。
I transfered data from our old SQL Server 2000 (SBS 2003) to another server running SQL Server 2008 r2 (Server 2008 r2 standard).
The data was transfered, but now the dates in the different tables are messed up.
Is there a special procedure I need to follow in order for the date column to transfer correctly. If memory servers, date columns are soted as an offset.
Anyone know how to correct this?
I tried looking it up, but couldn't find an answer. Maybe I just didn't think of the correct key words.
Thanks!
Edit: What I mean by messed up is that the original date (from the old server) is 2011-05-08 and the new date (from the new server) is 2010-04-14. I tried to see if there is a common offset for all he moved dates, but couldn't find one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定没有将旧(2011 年日期)/新(2010 年日期)倒过来吗?听起来您只是没有在 INSERT 中包含日期列,并且它具有默认值 GETDATE(),因此它插入了当前日期。或者有一些触发器将值从您指定的值更改为当前日期。要进行验证,请执行 SELECT..INSERT 到新表或临时表中,然后看看会得到什么。
Are you sure you don't have the Old (2011 dates) / New (2010 dates) backwards? It sounds like you just aren't including the date column in your INSERT, and it has a default of GETDATE(), so it has the current date getting inserted. Or there is some trigger changing the value from what you specify to the current date. To verify, do your SELECT..INSERT into a new or temp table and see what you get.