how do you flag a sql 2005 server database record where there has been no action for 8 hours
Posted on 2011-05-04
I need to develop an sql query to select a record (from ATable below) where there has been no action for 8 hours. Each record in ATable includes a field called requestDate(type datetime) and a field named statusname (varchar). When requestDate = requestDate + 8 hours and the statusname field reads “pending”.
I would like to update (set) the “sendemail” field to read “yes” Please update the sql code below to do this task. The query will be run by other means and not part of this task.