We currently have multiple tables that includes a datetime stamp which are updated every 10 seconds. we would like to do analysis on this data crossing tables via the datetime stamp and align records say within that 10 second window. As a record may have been placed at say 10:12:01 and a record we wish to match in another table say at 10:12:08 is it possible to create a calculated field that looks at the timestamp in individual table and rounds up say to the nearest 10 seconds so both the above would appear as 10:12:10
timestamp rounded data1 data2 data3 etc.......
10:12:01 10:12:10 xxxx xxxx xxxxx
10:12:08 10:12:10 xxxx xxxx xxxxx
Would this be achieved via a stored procedure or is there another way of adding this a calculated field. I would like to do this within SQL to make doing the analysis life easier.
Am new to this so any assistance would be appreciated.