SQL Server 2012 adds many new features to Transact SQL (T-SQL).  One of my favorites is the Rows and Range enhancements to the over clause. These enhancements are often times referred to as the windowing functions. Want to learn more about the windowing functions? Check out this aggregation class that I have created: Overview:ROWS PRECEDING, FOLLOWING, UNBOUNDED, refers to the …

Rows and Range, Preceding and Following Read more »

The following articles are a collection of my favorite SQL Server related posts over the last 6 months. 3 Steps to Work More Efficiently in SSMS. Posted 2/17/2013 Recently the 3 Steps to Work More Efficiently in SSMS article was one of my favorites. The three steps were: Display results in a separate tab. Hotkey for SELECT TOP 100 * FROM … …

Select Favorite SQL Server 2012 Articles Read more »

SQL Server 2012 adds a new stored procedure called sp_describe_first_result_set.  This new procedure returns metadata for the result set returned from a query. The metadata is information about what the results will look like.  sp_describe_first_result_set is an alternative to sp_columns, and appears to perform much better than sp_columns. The information here has been extracted from my SQL Saturday presentation on Whats New in TSQL …

T-SQL 2012 Procedure sp_describe_first_result_set Read more »

# The key to twitter is to follow the right hash tags.  What hash tags do you follow related to Microsoft SQL Server? Here are a few of the twitter hash tags that I follow: #SQLServer The generic SQL Server hash tag. Most anything goes on this hash tag. #SQLHelp The #SQLHelp hash tag is great when you need to …

What twitter hash tags do you follow for SQL Server? Read more »

It has been a year since SQL Server 2012 released. There were some fun posts on Twitter about the SQL Server 2012 birthday or anniversary. For instance: and another anniversary query (which doesn’t actually run): 1 year out since SQL 2012 released, and here are some things to note: There is no more Business Intelligence Development Studio (BIDS) in SQL …

Happy Birthday SQL Server 2012 Read more »

SQL Server 2012 introduces a new T-SQL object used to generate numbers, a SEQUENCE, similar to an identity column. You can think of a sequence as a take a number object, you just ask it to give you a number, and you get a number. When creating a SEQUENCE you need to specify the following: Start Increment Min Value, Max Value Cycle / …

Using a SEQUENCE object to generate letters. Read more »

SQL Server 2012 introduces the IIF statement. It is very similar to the IIF statement in MS Access. I have extracted the IIF part of my presentation on Whats new in SQL Server 2012, and turned it into a video with a demo of how to use the IIF statement. The IIF statement is a quick shortcut to simple CASE …

SQL Server 2012 IIF Statement Read more »

The Waits Types page has been updated on the T-SQL Wiki. The wait type documentation works will with the Database Health Reports historic wait time monitoring (Free download).  Below is a screenshot of the Historic Waits Query Advisor in the Database Health Reports project. Here is the current list of waits that have documentation available.  

The article could be named, “How to use up all of your SQL Server available memory with a single CTE query.”  Another name for the article could just be “SQL Server Bug Report” depending on how you look at it. When presenting unleashing Common Table Expressions at SQL Saturday a while back, I was asked a couple of great questions …

SQL Server Memory Hog Query Read more »