Monthly Archive: January 2012

Jan 18

Generating Consecutive Numbers Within a Given Range

A couple of months ago I was working on a project where we were revamping an existing system.  One piece of the system was a call to a stored procedure that generated a number in sequence and assigned it to a user that was accessing the application. It was very similar to taking a number …

Continue reading »

Jan 10

Capturing Data Modifications – The OUTPUT Clause

There are several reasons you may want to capture data that has been inserted, updated, deleted, or merged (2008). The OUTPUT clause that SQL Server provides is extremely helpful for these situations. I have been tasked on several occasions to “merge” data from a staging table to a production table. Whether or not it is …

Continue reading »