March 2005 Blog Posts
The validity of comparing apples and oranges

This is funny and insightful.  To a point, of course:

posted @ Wednesday, March 30, 2005 7:51 PM | Feedback (0)
SQL Server Mini-tutorial about Timestamp

This is a really good write-up about how the timestampe datatype is used in SQL Server:

posted @ Wednesday, March 30, 2005 12:37 PM | Feedback (2)
T-SQL to get last day of the month


The logic behind this 'last day of the month' calculations is that you get the month part of a given date, add one to it, there by getting to the next month. Then subtract 1 day from the first of that month. This whole Thing can be written in one line and here it is:


posted @ Tuesday, March 29, 2005 2:18 PM | Feedback (2)
Dumbest Ad Campaign of All Time Submission: Jockey's Comfort Zone

Does anyone think that Jockey's Comfort Zone ad campaign is good or coherent?  It seems to consist of people announcing completely retarded things such as:

“When the kids are out of control and things are going wrong, I take a mommy break, hide myself in a room and make myself a cup of herbal tea. I take a few deep breaths…in a few minutes I’m ready for the next challenge of the day.“

And this is just the online stuff.  The radio ads are god-awful. 

posted @ Monday, March 28, 2005 9:57 PM | Feedback (2)
Understanding Transaction Isolation Levels in SQL Server

Although the chart isn't depicted properly (or wasn't when I was looking at it), this is a good, quick explanation of transaction isolation levels in SQL Server:

posted @ Monday, March 28, 2005 8:23 AM | Feedback (2)
Random Thought: iPod TV ads

Maybe I'm just old.  Maybe I'm just not hip.  Okay, both of those are obvious.

But am I the only one that feels an irrational urge to punch the silhouetted dancers from the iPod TV ads?  Or at least mock them vociferously?

posted @ Saturday, March 26, 2005 7:10 PM | Feedback (2)
3 column tableless layout

Using CSS only.  The source is not 'easy' to read, but it's a great way to learn:

posted @ Saturday, March 26, 2005 6:36 PM | Feedback (2)
Whose Life is Worth Living?

It couldn't be said any better about Terry Schiavo and the issues her situation raises:

posted @ Saturday, March 26, 2005 10:14 AM | Feedback (1)
Random Musical Note: Kelly Clarkson

Now, I've never watched American Idol, and never intend to, but I gather Kelly Clarkson won the first one.  She seems to be a nice person, and she's nice to look at, and that's all good.

But, and maybe this is just me, she does a remarkable job of singing songs that sound like other people.  Two cases in point:

1) I heard 'Breakaway' on the radio the first time and thought to myself, “Hey, a catchy Indigo Girls song.”  It was only weeks later that I determined she sang it.

2) I heard 'Since you've been gone' on the radio the first time and thought to myself, “Hey, a mediocre Avril Lavigne song.”  It was only weeks later that I determined she sang it.

Maybe it's just me.

posted @ Friday, March 25, 2005 9:03 PM | Feedback (2)
Random Pet Peeve: Pick 3 and Pick 4 lottery players

Now, I play the lottery, the big games like BigGame and the state lottery.  I know it is 'wasted' money, but what the heck.  Who knows.

What annoys me are the people who insist on playing the Pick 3 and Pick 4 by picking 20+ individual tickets, one by one, verbally, as if by magical incantation, each pick is of utmost importance.  Use a sheet, or pick a number, and just go with it.  Please don't do this.  And if you do insist on doing this, please don't do this when there are other people waiting in line to buy a paper or something.

posted @ Friday, March 25, 2005 8:33 PM | Feedback (1)
CSS box model hack alternative


The box model hack is used to fix a rendering problem in pre-IE 6 browsers on PC, where by the border and padding are included in the width of an element, as opposed to added on. For example, when specifying the dimensions of a container you might use the following CSS rule:

width: 100px;
border: 5px;
padding: 20px

This CSS rule would be applied to:

<div id="box">...</div>

This means that the total width of the box is 150px (100px width + two 5px borders + two 20px paddings) in all browsers except pre-IE 6 versions on PC. In these browsers the total width would be just 100px, with the padding and border widths being incorporated into this width. The box model hack can be used to fix this, but this can get really messy.

A simple alternative is to use this CSS:

width: 150px

#box div
border: 5px;
padding: 20px

And the new HTML would be:

<div id="box"><div>...</div></div>

Perfect! Now the box width will always be 150px, regardless of the browser!

posted @ Friday, March 25, 2005 3:53 PM | Feedback (1)
SSW Rules to Better SQL Server Databases

As always, not all of these will apply in all cases, and some are arguable (I disagree with their take on nulls and identities), but the rules and guidelines for SQL Server listed here and produced by SSQ are a good source to review:

posted @ Thursday, March 24, 2005 11:21 AM | Feedback (1)
T-SQL Join Hints

It isn't clear if it is a good idea to use these or not.  Supposedly, the query optimizer will know what to do more often than not, but even Microsoft indicates you can use these in some instances.

posted @ Wednesday, March 23, 2005 10:08 AM | Feedback (2)
Five Apples

This has something to do with disproving the existence of psychics and other paranormal claims.  I think.  It is interesting to read anyway.

posted @ Saturday, March 19, 2005 9:35 AM | Feedback (2)
How to physically shrink a transaction log file

Do NOT do this without a recent backup and only if you are really sure you want to do this, otherwise you could lose data:

USE DbName
EXEC sp_dboption N'DbName', N'trunc. log', N'true'


posted @ Wednesday, March 16, 2005 12:21 PM | Feedback (2)
SQL Server Link Server Performance Tips

A useful list of tips if you are using SQL Server's linked server functionality:

posted @ Tuesday, March 15, 2005 12:46 PM | Feedback (2)
Syscolumns by Sysobject

select * from syscolumns sc
inner join sysobjects so on =
order by

posted @ Tuesday, March 15, 2005 12:02 PM | Feedback (2)
When moving SQL scripts between servers....

Double and triple check that you change the name of the server if it ever occurs in the script.  Otherwise, you can spend hours tracking down phantom problems.

posted @ Monday, March 14, 2005 12:54 PM | Feedback (2)
Large Text File Viewer

This is a great tool for what it does, and really works wonders when a file is too large for Notepad, Wordpad, or Microsoft Word to open.

posted @ Thursday, March 10, 2005 12:27 PM | Feedback (2)
SQL Tuning White Papers

A good set of tips.  The first focuses on using SET and DBCC, the second focuses on Indexing strategies, and the third focuses on Query optimization:

posted @ Wednesday, March 09, 2005 1:15 PM | Feedback (2)
Designing Code with VS.NET version of Visio

I don't think this is as robust as 'true' code generator tools, but worth looking into:

posted @ Tuesday, March 08, 2005 6:46 PM | Feedback (2)
Prevent Browser Caching with Web Forms

This tip allows you to reload a page when the back button in a browser is pressed:

posted @ Tuesday, March 08, 2005 6:44 PM | Feedback (2)
Tips on reducing shopping cart abandonment

Nothing earth-shattering here, but good common sense:

posted @ Tuesday, March 08, 2005 6:40 PM | Feedback (2)
How to kill a long running t-sql query

This only applies to certain cases, of course.

Through 'user error,' I managed to launch a sql script (at the end of the day, natually) that was still running the next day when I came in.  Because it was a script that populated a table, I knew if I tried to cancel/kill the process, it would then attempt to roll it back, which would take forever and a day.

Luckily, my script used sub-queries in it.  In cases such as this, all you have to do is to add data somewhere/anywhere that the sub-query is looking at, so that the sub-query pulls back more than one row.  Tada, script errors out.

posted @ Tuesday, March 08, 2005 8:55 AM | Feedback (1)