Today I had the opportunity to present When Corruption Strikes to the PASS DBA Virtual Chapter Meeting.  This was a lot of fun to be able to recap the previous 4 weeks of the Database Corruption Challenge, and share some of the ways to fix the corrupt database. I hope that everyone learned something that will help them when one day they …

Corruption Presentation Read more »

Welcome to the Week 5 Corruption Challenge.  If you have seen the t-shirt that I designed for the winner at the end of the 10 week period, please take a look. We are currently at the 5 week midpoint of the 10 week challenge. This challenge requires that you use the exact matching version of SQL Server for the challenge. …

Week 5 – Corruption Challenge Read more »

There is a lot happening right now, so I thought I would put together a brief overview of upcoming speaking engagements. May 13th – When Corruption Strikes (PASS DBA Virtual Chapter Meeting) May 16th – Exploring SQL Server Join Types – INNER, OUTER, and much more… (SQL Saturday Redmond) June 9th –  When Corruption Strikes 2 (HADR Virtual Pass Chapter) June …

Upcoming Speaking Engagements Read more »

This year the Denver SQL Saturday is being held on September 19th. I believe it has been 2 years since I attended SQL Saturday in Denver.  Since the last time I was at SQL Saturday Denver, my employment has changed. Previously I was employed as a full time employee at a local company. Now I am a freelance database consultant at …

SQL Saturday Denver Read more »

First lets take a look at two queries using CURSORS, the first one will use the FORWARD_ONLY type cursor, and the second will use the FAST_FORWARD type cursor. These two types sound very similar, but perform quite differently. Now for the FAST_FORWARD CURSOR example. Notice only one line has changed, that’s the line that says “SET @PeoplePhoneCursor = CURSOR FAST_FORWARD …

Simple Cursor Example : FORWARD_ONLY vs FAST FORWARD Read more »

In SQL Server the cursor is a tool that is used to iterate over a result set, or to loop through each row of a result set one row at a time. It may not be the best way to work with a set of data, but if you need to loop row by agonizing row (RBAR) in a T-SQL …

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

    Click on the grid to enlarge, then print it. Find the following words in the grid up, down, left, right, horizontal, vertical, and diagonal. ROWS  RANGE  PRECEDING  FOLLOWING  UNBOUNDED  IIF  CHOOSE  OFFSET  FETCH  FORMAT  CONCAT  SEQUENCE  PARSE  TRYPARSE  TRYCONVERT  THROW  LEAD  LAG  FIRSTVALUE  LASTVALUE  PERCENTRANK  CUMEDIST  PERCENTILEDISC  PERCENTILECONT  NOTE:  some of these terms normally have an underscore in …

SQL Sunday Fun – Word Search with New T-SQL 2012 Functionality Read more »

Day 15 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at data paging with CTE’s in a function. Yesterday we took a look at CTEs for Data Paging, today we will build on what we used yesterday. These queries will be using that database that was set up in a previous posting on the CTE_DEMO …

CTE Data Paging in a Procedure Read more »

Day 14 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at data paging with CTE’s and how it compares to the offset and fetch in T-SQL 2012. Now on to CTE Data Paging. These queries will be using that database that was set up in a previous posting on the CTE_DEMO Sample Database, if you haven’t …

CTE Data Paging Read more »

Day 12 of Common Table Expression Month (June) at SteveStedman.com, today we will be taking a look at how to use multiple nested CTEs in a query to use up all the memory on your SQL Server. These queries will be using that database that was set up in a previous posting on the CTE_DEMO Sample Database, if you haven’t set up …

Nested CTE’s Gone Wild – The Video Read more »