Open Letter to the Kansas School Board
for people amused by creationism and/or pirates...
« March 2005 | Main | July 2005 »
for people amused by creationism and/or pirates...
Today, Craig pointed out the need to globally update author bio's (55 of them) to reflect the fact that the company name changed over a year ago.
Justin and I got into a bit a "spitting contest to figure out an elegant way to accomplish this. We came up with the same solution around the same time. This might be trivial to some of our developers, but SQL can be a refreshing change and challenge from the typical production work we're faced with.
Feel free to let comment or suggest better ways to accomplish this.
Back to work....
--mark
--Look them up to confirm:
SELECT CONCAT("http://admin.oreillynet.com/cs/admin/view/au/",cs_rid) AS "Author Page"
FROM au
WHERE short_bio LIKE '%O''Reilly & Associates%'
OR bio LIKE '%O''Reilly & Associates%';
---------------------------------------
--Confirm that the UPDATE you're about to make will work:
SELECT REPLACE(short_bio, 'O''Reilly & Associates', 'O''Reilly Media, Inc.') AS short_bio,
REPLACE(bio, 'O''Reilly & Associates', 'O''Reilly Media, Inc.') AS bio
FROM au
WHERE short_bio LIKE '%O''Reilly & Associates%'
OR bio LIKE '%O''Reilly & Associates%';
----------------------------------------
--Make your UPDATE
UPDATE au
SET short_bio = REPLACE(short_bio, 'O''Reilly & Associates', 'O''Reilly MEdia, Inc.'),
bio = REPLACE(bio, 'O''Reilly & Associates', 'O''Reilly Media, Inc.')
WHERE short_bio LIKE '%O''Reilly & Associates%'
OR bio LIKE '%O''Reilly & Associates%';
...rinse, wash, and repeat for other potential cases of the company's old name (e.g. O'Reilly and Associates, O'Reilly & Associates etc.).
10pm last night on a one-lane portion of Highway 37 near Vallejo, traffic completely stopped. There were no opportunities to pull off. We turned off the car's engine and watched emergency vehicles race up the shoulder of the road towards an apparent accident.
We thought we'd surf the radio dial for traffic reports so we could know how for long we'd been sentenced. There isn't really that kind of news at that hour though. Instead, we found Tim on Tech Nation speaking about the history of the Internet, GNN, advertising, oreilly.com, Make, upcoming conferences and more.
The interview lasted almost exactly the length of our traffic stand-still. There's so much going on at this company, Tim could've kept going and I could've kept listening. The interviewer ended by saying something like, "I have about 12 more questions for you, but we don't have three hours of radio time so I hope you can visit us again...."
So thanks, O'Reilly Media, for being such an interesting place that I didn't notice that my car is in Park on the freeway.