Blog Post

Posting Code? Trust, But Verify

,

Here's a tip for bloggers (or anyone else) who use third party tools to convert T-SQL code into a publishing  friendly format…

Yesterday I posted scripts to identify overlapping statistics and I used a tool to convert the T-SQL into something that retained the formatting you'd see in Management Studio. This morning I received an email from a keen-eyed reader who brought a misspelling to my attention. Of course I had checked my code before I used the tool but not after, and sure enough it had added an extra letter into one table alias in the script. Here's what it looked like before and after formatting was applied:

Trust But Verify

So today's lesson: Trust, but verify. Even if you check that your code works before you apply formatting make sure to copy it back to Management Studio afterwards and see that it still runs like you think it's supposed to.

(And for what it's worth I've fixed the error in the original blog post. If you copied the scripts yesterday you may want to revisit the post and copy them again)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating