Link to home
Start Free TrialLog in
Avatar of TSN_Admin
TSN_Admin

asked on

Microsoft SQL server 2005 updating 2.5 million records fails

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?


UPDATE    CallRecords
SET              AreaCode = RIGHT(LEFT(PhoneNumber, 4), 3)
WHERE     (AreaCode IS NULL)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of brad2575
brad2575
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TSN_Admin
TSN_Admin

ASKER

now I feel real dumb I was doing it in the open table window.
thanks