Related topics

BOFH: Go on, beancounter, type DROP TABLE asset;

He went Colonel Kurtz on me, boss

Beginning SQL

Episode 4 "Don't put that there," I snap - calmly, but firmly, as a Beancounter goes to drop a chunk of IT detritus on my desk.

"What?" he asks, feigning innocence.

"That. Don't put it on my desk, it doesn't belong there."

"But it's IT equipment!" he bleats.

"It's IT crap and it doesn't belong on my desk - any more that real crap belongs on yours."

"Well what am I supposed to do with it?"

"Chuck it in the bin."

"But it's got book value!" he said, like a true beancounter.

"Due SOLELY to your depreciation policy" I counter.

"How so?"

"You depreciate IT equipment at 15 per cent a year instead of the far more realistic 33 per cent"

"I think 33 per cent is a bit high."

"Not for IT equipment it's not! But this bloody company has gone one step further, lumping calculators, desk phones and digital bloody clocks as 'IT equipment' and then uses some antiquated averaging algorithm to give the average desktop a usable life of seven years!"

I feel the pink mist coming again. If I'm lucky the aneurism will just kill me and not leave me on life support staring at reality TV until I can "Embrace the Chi" sufficiently to control my heart rate to a stop.

Or it could just be rage, it's too soon to tell.

"It's not as simple as that," the Beancounter says.

"It *IS* as simple as that! It's nothing harder than that! THAT is all it is. You picked a crap number and all sorts of crazy policy backs it up."

"No. We have a depreciation mechanism which is hard to change. If we change it we have all sorts of questions to answer from the tax people."

"Questions like 'Which of you idiots thought that a piece of kit would still perform after 7 years'?"

"No, I mea..."

"Questions like 'If you could be any type of dog, what type of dog would you be, and what sort of noise would you make when I ran you over with my car'?"

"I..."

"True, that's more of a ME question than a Revenue Service question."

"We would have to revalue all our IT equipment. It would take forever."

"No it wouldn't, you could do it with a couple of SQL commands. UPDATE asset SET value=0 WHERE purchdate < '20100601'; would carve out half the crap immediately. Actually, you may as well make that a DELETE statement. Hell if you did that from the SQL command line and you wouldn't even have to click OK for every asset. You could start putting stuff in the bin before afternoon tea!"

"You... can do that?!" he gasps

"Yes of course. It's SQL, a powerful language that doesn't ask 'Are you sure?' every time you try to write off a 13 inch Herc graphics monitor from the 1800s."

"Really. How?"

"You'd need a SQL frontend installed on your machine to do it. Do you have the SQL frontend installed?"

"I... don't know."

"Probably not then. Tell you what, I'll login you into the command line from here and step you through it. You'll just need to use your database username and password though, as APPARENTLY we're not to be trusted with Database access."

>clickety<

"Okay, so I'll give you a command line, but remember to add a semicolon to the end as I'll probably forget to say it."

"Uh-huh"

"So first command is DELETE from asset.."

"Delete from asset >clickety<"

"WHERE"

"Is this a new command line?"

"No, the same command."

"Oh, so I hit enter and everything, so now do I just have to go back type that last command in again?"

"It depends, did you put a semicolon at the end?"

"Yep"

. . .

"And... what did it say?"

"I don't know, it's still working I think. Oh, no, it's back again. It says 238,105 records deleted. That's an awful lot of old equipment! What should I do now?"

"Okay, well we can forget that WHERE clause for a start." I say

"Okay? So now?"

"Type COMMIT semicolon and hit return"

">clickety< Okay".

>ring!<

"Now what we want to do is ignore the phone and while we're at it maybe get rid of all the old computer furniture - WHICH YOU ALSO CLASS AS IT GEAR - while we're at it."

"Okay, so?"

"So DROP TABLE asset, semicolon return";

"Uh-huh"

"DROP TABLE GL, semicolon return";

"Okay"

"DROP TABLE AR, semicolon return";

"Are you sure?"

"Yeah, none of those departments really give a crap about their tables. We'll get onto the chairs in a minute. DROP TABLE AP, semicolon return";

"Okay, done. Now that we've actually cleared that stuff out we'll just pop into the server room and you can physically write off a number of old drives in our backup and archive servers."

"Physically?"

"Yeah, we put a drill through them so they can't be read again. Ever."

Twenty minutes later and the phone calls have been drowned out by the banging on the door of Mission Control...

"By my reckoning we've lost about a month of financials data, and a couple of years of archived data," I explain to the Boss shortly afterwards.

"And what happened exactly?"

"One of their guys went totally Colonel Kurtz from spending too much time in inventory control," I say, "commandeered my desktop and was dropping tables like a epileptic removals man!"

"Really?" The boss says "Speaking of inventory control, where do you want this old desktop machine? I've been using it as a footrest.."

. . .

"So the Boss went totally Colonel Kurtz and jumped out the window?" the PFY asks 10 minutes later, polishing the fingernail scratches off the window frame...

Sponsored: How to determine if cloud backup is right for your servers