avatar

Data Architect and DataOps Engineer

Using Feedburner Now

I have moved my syndication feed over to feedburner. For those of you that are subscribers, please update the links in your readers. My new feed is http://feeds.feedburner.com/AdamHutson. I will be rolling out a new website in the near future and the old feed will no longer be active. I’ll send out a last post as a reminder when it’s officially closed. Thanks for understanding.

First Microsoft Certification Exam

I’ve signed up to take my first Microsoft Certification exam. I will be taking the MCTS Exam 70-433: SQL Server 2008 Database Development exam. The date is scheduled for May 26th with 3 hours allotted. I’m hoping that it’ll be a breeze, since I’ve been writing TSQL for so long, but I’m still nervous. I’ve been reading the Training Kit on it and it’s a really quick read. Wish me luck.

Seconds Into DDHHMMSS Format

Got a fun requirement today. Using SQL, the developer needed to convert an integer representing seconds into the format of dd:hh:mm:ss. So 125 seconds would be 00:00:02:05. I put together a quick script that creates a table variable, inserts some test values, and selects back out of it. DECLARE @ADAM TABLE(sec INT NULL) INSERT INTO @ADAM (sec) VALUES (125) INSERT INTO @ADAM (sec) VALUES (3600) INSERT INTO @ADAM (sec) VALUES (3605) INSERT INTO @ADAM (sec) VALUES (60000) INSERT INTO @ADAM (sec) VALUES (6000) INSERT INTO @ADAM (sec) VALUES (600) INSERT INTO @ADAM (sec) VALUES (86400) INSERT INTO @ADAM (sec) VALUES (86405) INSERT INTO @ADAM (sec) VALUES (172800) INSERT INTO @ADAM (sec) VALUES (172860) INSERT INTO @ADAM (sec) VALUES (172865) INSERT INTO @ADAM (sec) VALUES (1234567) INSERT INTO @ADAM (sec) VALUES (75654) SELECT RIGHT('0' + CONVERT(varchar(6), sec/86400),2) + ':' + RIGHT('0' + CONVERT(varchar(6), sec % 86400 / 3600), 2) + ':' + RIGHT('0' + CONVERT(varchar(2), (sec % 3600) / 60), 2) + ':' + RIGHT('0' + CONVERT(varchar(2), sec % 60), 2) FROM @ADAM Results 00:00:02:05 00:01:00:00 00:01:00:05 00:16:40:00 00:01:40:00 00:00:10:00 01:00:00:00 01:00:00:05 02:00:00:00 02:00:01:00 02:00:01:05 14:06:56:07 00:21:00:54

Free Ebook: How To Become An Exceptional DBA

Brad McGehee is one of my more favorite authors of SQL literature. How to Become an Exceptional DBA is one of his more popular books. It’s really a career guide for novice and experienced DBAs, alike. It shows step-by-step methods for how to differentiate yourself from the crowd. Most of it is common sense, but it’s a good reminder for how to be an exceptional DBA. You can download a free pdf version of this eBook here.

Free Ebook: Don't Just Roll The Dice

One of the blogs that I follow is the Business Of Software, by Neil Davidson. Neil is the co-founder and joint CEO of Red Gate Software and the organizer of the Business of Software conference. Back in October, Neil released a free eBook, Don’t Just Roll the Dice. It’s a useful, short book on how to price software. It includes theory, practical advice and case studies so that software pricing isn’t a roll of the dice.

Free Ebook: Getting Real

37signals is one those companies that you just can’t help but notice. And once you do, you won’t be able to keep from following them and their philosophies. They are the guys that invented Ruby On Rails. They follow the strict mantra that software products should be built with the least number of features possible. Getting Real: The smarter, faster, easier way to build a successful web application is a new book written by the crew at 37signals.

Money Vs Decimal Data Types In Sql Server

Last week, one of our developers asked us in the DBA group what our standard was for currency columns. My first thought was DECIMAL(19,4), but I couldn’t give a reason why it was standard. I knew MONEY was essentially the same definition, but had heard that it was dangerous to use. Suspecting a rounding issue, I began with a simple test. DECLARE @dOne DECIMAL(19,4), @dThree DECIMAL(19,4), @mOne MONEY, @mThree MONEY SELECT @dOne = 1, @dThree = 3, @mOne = 1, @mThree = 3 SELECT @dOne / @dThree * @dThree AS DecimalResult, @mOne / @mThree * @mThree AS MoneyResult DecimalResult MoneyResult 1.

Puzzle Solved

I have been really getting into RSS feeds lately and have subscribed to alot of ones that interest me. I personally have been using the Google Reader on the iGoogle homepage. It’s a neat way to keep tabs on my varied readings. One that caught my eye was a challenge by Pinal Dave. Pinal challenged his readers to solve a puzzle that would return the size of each index for a speficied table.

Nullability And Default Constraint Behavior

When adding a new column with a default constraint to an existing table, keep in mind what you want your existing records to contain. If you add the new column and set it to be allow nulls, then all of the existing records will contain a NULL, and any inserted records will have the default value. However, if you set new column’s nullability to be NOT NULL, then the existing records will get back-filled with the default value.

Golfing With My Son In November

Yesterday, my 5-yr old son, Logan, and my step-father-in-law, Jerry, and I went to play golf …​ in November! Being in the hign-60’s, it was just TOO nice of a day to not take advantage of it. Logan really has a surprisingly good tee-shot. He made it on the green with one tee-shot and chipped one in from 15-ft away in the rough! Pretty stinking amazing for a kid that doesn’t get to play too much.