One of the tables has a date column in the sql server database. I need to calculate the time difference between all the consecutive rows i.e., difference between row1 and row2,differance between row2 and row3 and so on... I do know that this can be possible using cursors... Please help me in how to do so... My table structure is as follows
eventtime datetime
simid varchar(4)
finally i will calculate the minimun and maximun from that row datedifference values....
please help me
thanks in advance