Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Lefteris writes "I have a column with a date format of the form'yyyy-mm-dd HH:MM:SS.000' (e.g.'2006-04-05 17:20:30.623'). I would like this to be rounded up only to seconds and then sample every 10 seconds from the table. (e.g. '2006-04-05 17:20:30, '2006-04-05 17:20:40, '2006-04-05 17:20.50 etc)A colleague of mine suggested me to do the followingdatepart(second,mydatecolumn)%10=0 but the problem is that when my datestring finishes at 29.57 I miss it. I guess this approach will work fine if I can round up the digits after the seconds?I appreciate your help Kind RegardsPS: I run on Windows 2000 Prof, MSSQL server 2000 (ver 7)"