A paging problem, DTCms3.0, paging is based on the time page, if the Add Time (add_time) is the same value, regardless of the number of pages clicked, the data displayed is the same content, so there is a need to change the same time to specify a random date function.
The original paste script goes to http://bbs.csdn.net/topics/340165720 on the 7th floor of Feilniu.
The SQL script is as follows:
DECLARE@BDatedatetime,@EDatedatetime
SET@BDate='20150701'--Lower Limit
SET@EDate='20150714 23:59:59'--Upper Limit
SELECTID, Random_datetime=DATEADD(Second,ABS(CHECKSUM (NEWID()))%DATEDIFF(Second,@BDate,@Edate),@BDate)
fromDbo.dt_article
WHEREIdbetween 1 and -
The resulting content is:
IdRandom_datetime
32015-07-05 07:55:10.00042015-07-08 06:15:06.00092015-07-12 19:14:24.000102015-07-11 20:13:05.000122015-07-06 19:09:12.000132015-07-09 10:28:59.000142015-07-03 07:18:42.000152015-07-06 09:46:29.000
The ID at this time is the ID in the corresponding dt_article table.
Then we can write the generated data to the temporary table, then associate the update!
SQL Server randomly generates a specified range of dates