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: )

105 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: )

405 reads

Blogs

Friday Basics: the CIA Triad

By

In information security (INFOSEC), there several foundational concepts and principles. One of the ones...

A New Word: the standard blues

By

the standard blues– n. the dispiriting awareness that the twists and turns of your...

How Redgate Flyway Can Boost Your DevOps Journey

By

A brief introduction to the tool and its advantages for database migrations DevOps is...

Read the latest Blogs

Forums

client_app_name is empty in Extended Events output but present in sp_who2

By Pete Bishop

I'm tracing activity on one database and would like to include the client_app_name in...

How to compare data in customer table with other customers to find related cust

By Zond Sita

select Custno, Addr1, City, Res_Phone, Bus_Phone, Fax_Phone, Marine_Phone, Pager_Phone, Other_Phone, email1, email2 from customer...

process records in loop

By Bruin

I'm only processing 50,000 records not everything from the Table where there are 250,00...

Visit the forum

Question of the Day

The Marked Transaction

I want to mark a transaction in the log as a recovery point. How do I do this in my code if I use the transaction, myTran?

See possible answers