Shane on February 20th, 2008

My almost two year-old daughter, Dora, loves to read Sandra Boynton. She loves the pictures. She loves to laugh at all the punchlines. Her recent favorite is Philadelphia Chickens, which is a book/CD combo by Ms. Boynton. Dora asks for the book by the name “Cows” which is the title of the first song. I [...]

Continue reading about Boynton Goes Berserk

Shane on June 28th, 2007

When I was working with Oracle, I got hooked on using MINUS and INTERSECT. Well, it turns out that Microsoft implemented these functions in a slightly different way in SQL 2005. Jeff Smith lays out a nice example here.

Continue reading about Favorite New SQL 2005 Syntax

Shane on April 19th, 2007

My friend Gary is fulfilling his life-long dream to take a trip around the world. This being the internet age, we get to follow along from the comfort of our living rooms without having to get the shots. I encourage you to check it out. Gary is one of the funniest and smartest people I [...]

Continue reading about See Everything, Everywhere

Shane on April 2nd, 2007

Here’s a little BI humor for anyone from one of my favorite BI writers: Donald Farmer.

Continue reading about BI Humor

Shane on February 12th, 2007

Also on the subject of checksum testing, this query will generate a checksum query for a given table. Use this query to generate the checksum for each table, then customize the sum() clauses if you did any transformations on your data. select case a.xtype when 167 then ‘SUM(LEN(‘’)) as sum_len_’’,’ when 175 then ‘SUM(LEN(‘’)) as [...]

Continue reading about Checksum Code Generator

Shane on January 31st, 2007

select upper( as table_name, upper( as column_name, a.colid, a.length, a.xprec, a.xscale, a.xtype,(CASE WHEN a.xtype=167 then ‘varchar’ WHEN a.xtype=175 then ‘char’ WHEN a.xtype=61 then ‘datetime’ WHEN a.xtype=106 then ‘decimal’ END) as col_type from syscolumns a, sysobjects b where and b.xtype=’U’ and upper( ‘DTPROPERTIES’ order by,, a.colid

Continue reading about Extracting Metadata From SQL Server

Shane on January 31st, 2007

Here is a useful query for getting a list of failed jobs from SQL Server. If you are responsible for tracking and logging job failures, this administrative work can be overwhelming in a busy week. This query will list all jobs that failed during a given time period. It uses a function that I created, [...]

Continue reading about SQL Server Failed Jobs