In 2012 SQL Server introduced the SEQUENCE object.  Looking at the syntax it is very similar to how Oracle has implemented SEQUENCEs for many years.  I believe that the SEQUENCE was introduced to aid in the transition of Oracle developers to SQL Server. First off what is a SEQUENCE???… A user-defined object that generates a sequence of numeric values. To …

SQL Server SEQUENCE Read more »

The following articles are a collection of my favorite SQL Server related posts over the last 6 months. 3 Steps to Work More Efficiently in SSMS. Posted 2/17/2013 Recently the 3 Steps to Work More Efficiently in SSMS article was one of my favorites. The three steps were: Display results in a separate tab. Hotkey for SELECT TOP 100 * FROM … …

Select Favorite SQL Server 2012 Articles Read more »

SQL Server 2012 introduces a new T-SQL object used to generate numbers, a SEQUENCE, similar to an identity column. You can think of a sequence as a take a number object, you just ask it to give you a number, and you get a number. When creating a SEQUENCE you need to specify the following: Start Increment Min Value, Max Value Cycle / …

Using a SEQUENCE object to generate letters. 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 »

When creating a table you can specify IDENTITY with the following syntax: For example The IDENTITY property is valid for data types of the integer data type category, except for the bit data type, or decimal data type.  So how many rows can you insert into that table?  It depends on the data type used. BIGINT maximum value is 9,223,372,036,854,775,807 …

Are you wasting half the capacity of IDENTITY? Read more »

As shown in my previous posting on SEQUENCES, they are a user-defined object that generates a sequence of numeric values in Transact SQL 2012.  But what if you want to generate letters instead of numbers. Here is a code example of a sequence used to generate letters (indirectly). Which generates the following output. Just another cool trick with new features in …

TSQL 2012 – Generating letters with a SEQUENCE object Read more »

SQL Server 2012 introduces the SEQUENCE object.  Looking at the syntax it is very similar to how Oracle has implemented SEQUENCEs for many years.  I believe that the SEQUENCE was introduced to aid in the transition of Oracle developers to SQL Server. First off what is a SEQUENCE… A user-defined object that generates a sequence of numeric values. To create …

SQL Server 2012 – SEQUENCE Read more »

It has been a busy week getting ready for  SQL Saturday Vancouver, planning sessions to present at future training’s and determining new material to present. Today I submitted 4 sessions to Seattle Code Camp for their June session. Using SSRS 2012 Reports to Analyze SQL Server Health Unleashing Common Table Expressions in SQL Server SQL Server Performance for Developers What’s …

4 Sessions Submitted to Seattle Code Camp Read more »