T-SQL

Technical Article

Update a table column with a sequence number v2.0

  • Script

In response to Sachinvaishnav's search for a better way to insert a sequence number column in the same table, I bring you a cursor free Sql server 2005 example that utilizes the new ROW_NUMBER() OVER(ORDER BY) Function available in 2005

You rated this post out of 5. Change rating

2006-04-11 (first published: )

110 reads

External Article

Try/Catch Block in SQL Server 2005

  • Article

Server 2005 now supports a more programmable error trapping convention in T-SQL code. This error handling is known as the TRY/CATCH block. The TRY/CATCH block allows T-SQL to handling errors like other programming languages, such as Microsoft Visual C# and C++. In addition to the TRY/CATCH block, Microsoft has expanded the set of available system functions in SQL Server 2005 for returning error codes and messages when an error occurs in your T-SQL code. This article will explore the new TRY/CATCH block and explain the new system functions for returning error codes and messages.

2006-03-13

3,150 reads

Technical Article

Progressive Sums in T-SQL

  • Script

A common problem in sql is how to calculate and process, for the current row, information that is based on the results (sum, product, difference, etc) of the rows read so far.A solution (we use) to this problem is to create a self join query based on the primary key using the condition of "greater […]

2 (1)

You rated this post out of 5. Change rating

2006-03-23 (first published: )

414 reads

Blogs

Learning Database Design and Power BI Performance

By

I spend my days working on and managing SQL Server instances—working days at least,...

Free SQL Training: Dive into Databases This December!

By

Want to learn SQL and get some real practice this December? Check out the...

Monday Monitor Tips: CIS Compliant

By

A new feature added to Redgate Monitor Enterprise automatically. CIS compliance is something many...

Read the latest Blogs

Forums

Merry Christmas 2025

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Merry Christmas 2025

The Reindeer Count

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Reindeer Count

Events of System_health extended event serious or not

By IT researcher

I have listed the event names present in my system_health extended event report. Based...

Visit the forum

Question of the Day

The Reindeer Count

How many reindeer does Santa have pulling his sleigh? (according to the famous song) Hint, the answers are not base 10.

See possible answers