I have a table of data in SQL Server 2008 where I need to go through each record and update one of the fields with the result of a sub query.
I have attached a sample of the table in the code section. I need to Update the Stop field based on the getting the actual date time from another table passing the AgentID and Date based on the current record that is processing.
Whats the best / simpliest way to achieve this?
Look for to your help.
Sample of data to update
AgentID Start Stop Dur.
360 2011-02-09 16:18:50.797 2011-02-09 16:18:50.797 2
168 2011-02-10 08:28:37.133 2011-02-10 08:28:37.133 2
16 2011-02-10 08:31:38.047 2011-02-10 08:31:38.047 2