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 »

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 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 »

Last month I posted another CTE blog entry Using a CTE to Split a String Into Rows with Line Numbers.  Since then I have used it but, but realized that what I really needed was a diff tool to compare two strings similar to the command line diff tool. First we take a look the SplitWithLineNumber from the previous article.  This …

VARCHAR diff function Read more »

On February 16th, 2013, I will be presenting at SQL Saturday in Vancouver BC. My primary presentation for this event is: Exploring the TSQL Enhancements in SQL Server 2012 This is a fun one, lots of information to cover in one hour, including —OVER Clause Enhancements, —IIF and CHOOSE, —OFFSET / FETCH, —FORMAT, CONCAT, —SEQUENCE, —sp_describe_first_result_set, —New Date and Time Functions, PARSE, TRY_PARSE, TRY_CONVERT, and —THROW exception. and my backup …

SQL Saturday 198 in Vancouver BC Read more »

My SQL Saturday experience originally started at a SQL Saturday in Redmond WA.  I am looking forward to the event! This year my common table expressions presentation was selected. This is going to be exciting as this CTE presentation marks the release of my CTE book which is available at Amazon.com.   Here is a zip file with the presentation …

SQL Saturday 212 in Redmond WA Read more »

One possible cause of the “Cannot resolve the collation conflict” error message is that your database collation doesn’t match the TempDB Collation. Recommendation It is recommended that the collation of your database match the collation TempDB.   It is possible that if your collations do not match that you may get errors, or that queries using TempDB will not run …

Cannot resolve the collation conflict Read more »

I had so much fun at SQL Saturday in Vancouver BC last year, I have decided to go again. The sessions submitted are: The “Run Faster” Switch The NO_LOCK hint is often believed to be the “Run Faster” switch, but in reality can cause some very inconsistent results.   Explore alternatives to the NO_LOCK hint to get your queries to run …

Sessions submitted to SQL Saturday Vancouver BC Read more »

In the manufacturing world it is referred to the 7 wastes, or the Japanese term Muda.  How does this apply to software development. THE 7 WASTES OR MUDA ARE: Transportation Inventory Motion Waiting Over-Processing Over-Production Defects These all apply to software development in similar ways as they apply to a manufacturing facility. For instance: Transportation refers to moving things, which …

Muda – or the 7 Deadly Wastes Read more »