Blog Archives

SQL Sunday Word Scramble

SQL Server – TSQL Analytics Word Search   Find the following words in the word scramble above. TOP RANK DENSE_RANK ROW_NUMBER NTILE OVER LAG LEAD FIRST_VALUE LAST_VALUE PERCENT_RANK PERCENTILE_DISC PERCENTILE_CONT CUME_DIST PARTITION ROWS PRECEDING FOLLOWING UNBOUNDED   Download the Printable PDF

Posted in Analytic TSQL, SQL Sunday Tagged with: , , , , , , ,

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

    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 

Posted in SQL Sunday, TSQL Tagged with: , , , , , , ,

Rows and Range, Preceding and Following

SQL Server 2012 adds many new features to Transact SQL (T-SQL).  One of my favorites is the Rows/Range enhancements to the over clause. These enhancements are often times referred to as the windowing functions. Overview: ROWS PRECEDING, FOLLOWING, UNBOUNDED, refers

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

Happy Birthday SQL Server 2012

It has been a year since SQL Server 2012 released. There were some fun posts on Twitter about the SQL Server 2012 birthday or anniversary. For instance: and another anniversary query (which doesn’t actually run): 1 year out since SQL

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

SQL Saturday Presentation

I am at SQL Saturday in Vancouver BC today. Here is the download of my presentation. Download zip file. Here is the presentation outline. OVER Clause Enhancements ROWS PRECEDING, FOLLOWING, UNBOUNDED RANGE PRECEDING, FOLLOWING, UNBOUNDED IIF – Immediate IF or

Posted in SQL Saturday Tagged with: , , , , , , ,

My Top 10 TSQL Enhancements in SQL Server 2012

So far after playing around with SQL Server 2012 there are many new features to SQL.  Overall I think my favorites are in the Analytic Functions category.  Here is my breakdown of the top 10 transact SQL enhancements to SQL

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

IIF in TRANSACT SQL on SQL SERVER 2012

For years I have heard the question of how can I do an IIF in TSQL?  Honestly I never thought it would be that useful since the CASE statement is easy enough to use, but after seeing it in TSQL

Posted in TSQL 2012 Tagged with: , , , ,

Transact SQL OVER Clause – ROWS UNBOUNDED PRECEDING or FOLLOWING

In a previous article I covered the usage of ROWS PRECEDING and FOLLOWING in the over clause.  For this example I am going to use the same database and tables that I created in the previous example to show ROWS UNBOUNDED

Posted in SQL 2012, TSQL, TSQL 2012 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