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 …

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. …

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 …

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 …

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