Blog Archives

T-SQL: A Simple Example Using a Cursor

For more information on cursors, also take a look at the free SQL query training provided by Steve Stedman. In SQL Server the cursor is a tool that is used to iterate over a result set, or to loop through each

Posted in SQL 2008, SQL 2012, TSQL Tagged with: , , , , , , ,

Installing Sample Databases for SQL Server 2008R2

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.

Posted in SQL 2008 Tagged with: , , , , ,

Using a CTE to Split a String Into Rows with Line Numbers

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

Posted in CTE, SQL 2008, SQL 2012 Tagged with: , , , , , ,

How BIG is too BIG for a BIGINT IDENTITY?

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

Posted in SQL 2008, SQL 2012 Tagged with: , , ,

SQL Server 2008 – Filtered Indexes

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

Posted in SQL 2008, Steve Tagged with:

Newsletter Signup

Stay informed of Database Corruption Challenge events, and other things happening at SteveStedman.com with my newsletter.
Newsletter signup form.

Stedman Solutions

StedmanSolutionsRemoteSkilledDBA

Common Table Expressions Book

Paperback:

Kindle: