Posts tagged with: sql

Order Matters: Using select to set variables

A quick post today. SQL allows you to set many variables at the same time using a select statement. However, many people do not realize that when you do this......
Continue Reading →

Warning: RESEED Changed from SQL 2008 R2 to 2012

Recently, someone on my team had an issue with automated database tests failing and we discovered a change Microsoft made to the SQL engine.  If you use the DBCC CHECKIDENT command to......
Continue Reading →

Code Writing Code Round 1 – CRUD Statements

Unfortunately, things are not that easy for us mere mortals.  However, we can make many repeatable tasks much easier by automating them or supplying tools to simplify them. I was......
Continue Reading →

Data flow in decoupled solutions

Many of the current products we have released into the wild are using an architecture such that the standard product is not tightly coupled with any particular sites custom ETL......
Continue Reading →

The Seven Sins against TSQL Performance

SQL MVP Grant Fritchey posted his “The Seven Deadly Sins against TSQL Performance” article quite a while ago, but it is still relevant today. If you are new to TSQL,......
Continue Reading →

Announcements at SQL PASS 2016

SQL PASS happened out in Seattle a couple weeks ago and Microsoft announced some new features they are bringing to the SQL Server platform. I will briefly discuss some of......
Continue Reading →

Tally, Oh! A table of numbers, splitting strings, and more

I was recently asked, “What is the DW.Numbers table used for in our database?” The simple answer is that it is can be used to perform many tasks in a......
Continue Reading →

The Value of Naming Constraints

In certain designers, such as SQL Server Management Studio table designer, when you create certain constraints (Primary and foreign keys, defaults, and check constraints) they will be given a name that......
Continue Reading →

Performance Troubleshooting without Data? Enter DBCC Clone Database

With SQL server 2014 SP 2 Microsoft added a new feature that sounds pretty sweet for troubleshooting some performance problems. It is called Clone Database. In a Nutshell Clone database......
Continue Reading →

A slow death from Implicit Type Casting

A common code smell that attracts my attention right away is when I see an explicit conversion being done, typically done using CAST or CONVERT. However, implicit type casting can be worse and......
Continue Reading →