Getting a value from a row at particular time

Posted by Swetha Bindu on Stack Overflow See other posts from Stack Overflow or by Swetha Bindu
Published on 2012-06-04T08:37:26Z Indexed on 2012/06/04 10:40 UTC
Read the original article Hit count: 227

Filed under:
|

I had a row in my database:

starttime:4/6/2012 2:00pm, Endtime:31/12/9999, name:"swetha", status:"open".....

When I update this row I changed the starttime to the current time (getdate()) and have no issues. I am running a Windows Service each day at 1am to modify a value in the row.

I would like to know the status of my row at 4/6/2012 11:59 pm when my service runs.

There is no need to do an update at 4/6/2012 11:59 pm and the last update may be at any time of the day however my requirement is to get the status value at 4/6/2012 11:59 pm.

I would like to have the query in SQL Server 2008. Can anyone please help me to find a solution?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-2008