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,151 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,321 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,243 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,359 reads

Blogs

Going to Cloud? Look at the Shared Responsibility Model

By

The bottom line here is this: the idea that a CSP takes care of...

How Long Will It Take to Learn SQL? The Truth Might Surprise You

By

In today's data-driven world, SQL (Structured Query Language) is a blazing-hot skill. It's your...

Flying Halfway Around the World to Australia

By

I leave tonight for Australia. I was in London 3 days ago, so this...

Read the latest Blogs

Forums

Fine-tune SQL for better performance

By don075

I have been asked to fine-tune the following SQL that was written by a...

Row-level security in SQL server

By dzukik0711

In this scenario, I seek assistance in implementing row-level permissions for a table named...

SSIS Web Service task SSL errors

By smithloo

I've tried different credentials, target server versions, etc. hitting our Primavera WSDL. Works great...

Visit the forum

Question of the Day

Initial Config of tempdb

What are the initial config sizes for the tempdb primary data files, secondary data files, and log files in SQL Server 2022?

See possible answers