[cfgeeks] One of these things doesn't belong here..
Karen Hill
karendhill at yahoo.com
Fri Jan 12 00:31:09 EST 2007
One of these things isn't the same, one of these things isn't like the other...
Can you spot the problem in this script? Yeah, I know it's not a tough one but there's a story I'd like to share...of course, it's funny now...
BEGIN TRAN --COMMIT ROLLBACK
UPDATE EmpPers
SET EepNameFIRST = REPLACE(EepNameLAST, '-', ' ')
FROM EmpPers
WHERE (EepNameLAST LIKE '%-%')
Unfortunately, I noticed it after I had made about 300 name changes across 2 different servers and about 10 different databases. All I can say is "THANK GOD FOR TEST SERVERS, BACK-UPS, AND DOCUMENTATION!" Two hours later, no one is the wiser. Lessons learned: (1) When you're getting tired and the eyes are getting heavy, is NOT the time to stop doing your select statement before you run commit on each update statement!!!! (2) When updating production ALWAYS, ALWAYS, ALWAYS make a back-up copy of the table you are doing mass updates to.
You know what they say...lessons learned during states of pure panic are always the ones best remembered longest! ;)
~Karen
g33kch1ck
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.cfgeeks.org/pipermail/cfgeeks/attachments/20070111/19c52451/attachment.htm
More information about the cfgeeks
mailing list