I am trying to update 2.5 million records and I just time out after about 30 seconds. I am on the server itself using the management studio I was to update a null field based on another field here is the query. I am then going to need to loop or use a cursor to iterate over each record and look it up in a table to pull the state and timezone for each area code. It this a time out issue or on index issue or am I just doing something dumb?
SET AreaCode = RIGHT(LEFT(PhoneNumber, 4), 3)
WHERE (AreaCode IS NULL)