Microsoft has announced that as of July 2019 SQL Server 2008 and SQL Server 2008R2 will be at the end of life support. What does this mean? No more updates, no more security patches, and no more support. It is strongly recommended that prior to end of life that you move to an updated supported version of SQL Server, so …

SQL Server 2008 and 2008R2 End of Life – coming soon Read more »

For more information on cursors, also take a look at the free SQL query training provided by Steve Stedman. Cursors are a feature of SQL Server that allow users to iterate through a result set one row at a time. This can be useful in situations where a user needs to perform a set of operations on each row of a …

T-SQL: A Simple Example Using a Cursor Read more »

As I work on testing the Database Health Reports project, I have configured several test servers running as virtual machines using Hyper-V. Part of setting these up for testing, I usually end up installing the sample databases for SQL Server. The sample databases give me something to test against, and what usually ends up happening is I end up polluting …

Installing Sample Databases for SQL Server 2008R2 Read more »

SQL Server 2012 adds a new function called DateFromParts.  This new function simplifies the creating of a DATE type in TSQL over the older ways of doing it. The information here has been extracted from my SQL Saturday presentation on Whats New in TSQL 2012. Pre-SQL 2012 First lets take a look at how you would do the equivalent to DateFromParts before SQL …

DATEFROMPARTS function in TSQL Read more »

Last year while working on my CTE presentation for a SQL Saturday I added a blog post called “Using a CTE to Split a String Into Rows“, and since that posting I have used it many times. But as things go in development, eventually there is a need to do something more. Doing some complex string building to create files …

Using a CTE to Split a String Into Rows with Line Numbers Read more »

After writing a recent blog post on Are you wasting half the capacity of IDENTITY, I started thinking about how much is too big for an BIGINT IDENTITY. If you don’t know about, you can get Are you wasting half the capacity of IDENTITY 9,223,372,036,854,775,807 IDENTITY values out of a BIGINT in SQL Server.  Which in easier terminology is 9 with roughly 18 …

How BIG is too BIG for a BIGINT IDENTITY? Read more »

SQL Server 2008 introduces a new feature called Filtered Index. A filtered index is a way of adding a WHERE clause to the index definition to get faster access to a subset of the data. For instance if you have a huge table where you are typically only accessing a small part of the table, you can add a filtered …

SQL Server 2008 – Filtered Indexes Read more »