UPDATE dbo.T_ARTICLE SET PUBLISH_TIME = DATEADD(DAY, 6 - DATEDIFF(day, FILE_TIME, PUBLISH_TIME), PUBLISH_TIME) WHERE PUBLISH_TIME >= '2014/01/06' AND FILE_TIME IS NOT NULL AND DATEDIFF(DAY, FILE_TIME, PUBLISH_TIME) > 7
本文共 453 字,大约阅读时间需要 1 分钟。
UPDATE dbo.T_ARTICLE SET PUBLISH_TIME = DATEADD(DAY, 6 - DATEDIFF(day, FILE_TIME, PUBLISH_TIME), PUBLISH_TIME) WHERE PUBLISH_TIME >= '2014/01/06' AND FILE_TIME IS NOT NULL AND DATEDIFF(DAY, FILE_TIME, PUBLISH_TIME) > 7
转载于:https://www.cnblogs.com/wenghaowen/p/3512314.html