Home Blog Page 5

T-SQL Tuesday #001 (Date/Time Tricks): The Roundup

14
Wow! The response to the first T-SQL Tuesday was truly amazing. We ended up with 20 great posts, from all over the world. If you didn’t participate this time, fear not—we’ll be doing this every month from now on so there is plenty of time to jump in. And don’t forget our Twitter hashtag,...

T-SQL Tuesday #001: Exploring “Fuzzy” Interval Islands Using SQLCLR

0
When working with time intervals, we often want to ask a couple of basic questions: Which time periods are not covered by our intervals? These are known as "gaps". What are the time ranges that we are fully covering? These are known as "islands". If you're unfamiliar with...

Invitation to Participate in T-SQL Tuesday #001: Date/Time Tricks

44
T-SQL Tuesday is the SQL Server blogosphere's first recurring, revolving blog party. The idea is simple: Each month a blog will host the party, and about a week before the second Tuesday of the month a theme will be posted. Any blogger that wishes to participate is invited to write a post on the...

SQL Server 2008: Lock Escalation, INSERTs, and a Potential Bug

10
Lock escalation is a funny thing. I've found myself on numerous occasions waging war against its concurrency-sapping existence, and rarely have I found myself wishing that it would work more aggressively. But there is a time and place for everything, and yesterday I discovered that a major change has occurred with regard to lock...

What Happened Today? DATE and Date Ranges Over DATETIME

13
A few days ago Aaron posted yet another fantastic entry in his Bad Habits series, this one discussing mishandling of date ranges in queries. This is a topic near and dear to me, having had to clean up a lot of poorly thought out code in the past few years. Aaron's post includes many...

Bad Habits to Kick: Inconsistent Indentation

15
My last post in Aaron's series drew a mixed review from some readers, and I'm sure this one will do the same. But that's part of the fun! One of the biggest threats to maintainability is code that's not properly formatted. When I'm called in by a customer to debug some legacy code, often...

Bad Habits to Kick: Not Using “AS”

21
Aaron has recently been doing an absolutely fantastic series of posts detailing various "bad habits" that many of us pick up somewhere along the way. These coding anti-patterns aren't going to crash your server, but they will make your code more difficult to read and maintain. I'm enjoying Aaron's series so much that I've...

Dr. OUTPUT or: How I Learned to Stop Worrying and Love the MERGE

18
It would be fair to say that there aren't a huge number of programmability features added to SQL Server 2008 that will have a great impact on most of our day-to-day lives as SQL Server developers. The release was clearly manageability themed rather than programmability themed, and I can count the most interesting and...

Uniquely Identifying XML Nodes with DENSE_RANK

11
When working with XML in SQL Server, you might want to uniquely identify one node against another. But due to the flexibility with which XML can be defined, this is not always directly possible. SQL Server's own XML structures are guilty of having this problem, as I discovered while writing the Extended Events Code...

Introducing: Extended Events Code Generator v1.0

6
SQL Server 2008 Extended Events. It's a high-performance, feature-rich, and extremely useful tracing system. Too bad it's so difficult to figure out how to use it! Or is it?Earlier this week Jonathan Kehayias announced his SSMS addin for Extended Events, which makes it super-easy to create and manage events, and even view the raw...

Popular Posts