R Glen Cooper

Glen Cooper (r.glen.cooper@gmail.com) is a SQL Server programmer. His current interest involves graph-theoretical solutions to optimization problems. Glen holds a PhD in Mathematics specializing in model theory and symbolic logic.
  • Interests: SQL Server, .NET, Mathematics

SQLServerCentral Article

Dijkstra's Algorithm

Introduction This article celebrates a classic algorithm [1] of Dijkstra (1930 – 2002) which finds a path of minimal cost between any pair of nodes in an undirected graph. His procedure is widely recognized as a fundamental tool for examining communication and transportation networks (eg. Google Maps) and is surprisingly simple. By his own admission, […]

5 (5)

You rated this post out of 5. Change rating

2024-01-05

7,194 reads

SQLServerCentral Article

Horizontal Trees

Introduction The sp_HorizontalTree procedure introduced here may be used to audit tables with dependent columns. A column is dependent on another if the meaning of the first column depends on the meaning of the second. For example, in a table containing accounting information, the meaning of a Fiscal Quarter column depends on the Fiscal Year to […]

You rated this post out of 5. Change rating

2023-06-16

2,324 reads

SQLServerCentral Article

How To Avoid MERGE in SQL Server

Introduction This article shows how to script a basic merge between two tables, without using MERGE. This can be handy when you're merging a pair of tables with hundreds of columns, since the script doesn't know anything about them. This technique introduces and populates some auditing columns (IS_DELETED, IS_INSERTED, IS_UPDATED, TRANSACTION_DATE) for each record, and runs fast. […]

4.5 (6)

You rated this post out of 5. Change rating

2023-02-20 (first published: )

18,258 reads

SQLServerCentral Article

Navigating Trees With CTE

Introduction This article shows how common table expressions (CTE) in SQL Server are naturally suited for navigating trees, such as finding its longest path, or diameter. Recall that a tree is an undirected graph where unique paths exist between any two nodes (i.e. vertices). Any node may be selected as its top node, with its […]

4.8 (5)

You rated this post out of 5. Change rating

2021-04-19

7,383 reads

Blogs

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

The Comprehensive Guide to Mastering Your SQL DBA Skills

By

Database administrators (DBAs) are the backbone of data-driven organizations. If you're looking to break...

Friday Basics: Authentication vs. Authorization

By

Another security fundamentals topic is authentication versus authorization. For those who have a clear...

Read the latest Blogs

Forums

Take Care

By Grant Fritchey

Comments posted to this topic are about the item Take Care

Performance

By LearningDBA

Experts, I am learning some skills so I can troubleshoot some performance-related issues. I...

How to install mysql-connector-python-8.4.0.zip it does not have setup.py

By ivanb

How to install mysql-connector-python-8.4.0.zip it does not have setup.py. Checked also: mysql-connector-python-8.4.0.tar.gz

Visit the forum

Question of the Day

Two Table Hints

What happens when I run this code:

SELECT
  p.ProductName
, p.ProductCategory
FROM dbo.Product AS p WITH (NOLOCK, TABLOCK);

See possible answers