SQL Server cursors are one common topic on the Internet. You’ll find different opinions when to use them and when not to do it. Today, we’ll also talk about them and answer the question when (not) to use them.
Read more »Cursors
An overview of the SQL cursor @@FETCH_STATUS function
January 23, 2020SQL cursor is one of the most popular database objects. It is used to retrieve data from the result set of an SQL query one row at a time. Even if the cursor is not recommended from a performance perspective, they are still widely used especially when handling a small amount of data.
Read more »SQL Server cursor attributes
May 8, 2019A SQL Server cursor is a database object that is used to process the data in a set row by row. In this article, we will review how to create a cursor and different attributes used while declaring a cursor.
Read more »The Halloween Problem in SQL Server and suggested solutions
May 4, 2018Description
As per Wikipedia, the Halloween problem was first discovered by Don Chamberlin, Pat Selinger, and Morton Astrahan, on Halloween day, 1976.
Read more »Understanding cursors and replacing them with JOINs in SQL Server
November 24, 2017Relational database management systems including SQL Server are very good at processing data in sets.
However, if you want to process data on row-by-row basis rather than in sets, cursors are your only choice. Unfortunately, cursors are extremely slow and so where possible should be replaced with JOINS.
Read more »Using SQL Server cursors – Advantages and disadvantages
March 23, 2016Intro
In relational databases, operations are made on a set of rows. For example, a SELECT statement returns a set of rows which is called a result set. Sometimes the application logic needs to work with a row at a time rather than the entire result set at once. In T-SQL, one way of doing this is using a CURSOR.
Read more »Using a cursor to correctly extract SQL Server data and place it in a Reporting Services matrix
February 23, 2015Introduction
In our last two chats, we discussed enterprises that have had financial years that began in July and ended at the end of June. One of our clients works with this fiscal calendar and their financial folks are Excel “Fundi’s” (Fundisa is a Nguni word for “expert”). Many of their reports contain the current month’s sales, in addition, carrying running totals from the beginning of the fiscal year to date. Read more »