Here is a short video tutorial that shows how to use the CHOOSE function in T-SQL on SQL Server 2012, SQL Server 2014 or Newer. This was originally part of my free SQL query training for the 70-461 certification exam. Here is the sample code that goes along with the CHOOSE function training. This sample code has been tested and confirmed …

Using the TSQL CHOOSE Function 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 »

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 Inline IF (from Access) CHOOSE (from Access) OFFSET / FETCH FORMAT CONCAT SEQUENCE (from Oracle) sp_describe_first_result_set New Date and Time …

SQL Saturday Presentation Read more »

In SQL Server 2012 there is a new function called CHOOSE that takes in an offset, and a list of options.  Choose is a function that returns the item at a specific index. Syntax: —CHOOSE(index, val_1, val_2, val_3, …) —If the index is greater than the number of values or less than 1 it returns NULL —Easier than using a …

TSQL 2012 CHOOSE Function Read more »