R Glen Cooper

  • Interests: SQL Server, .NET, Mathematics

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)

2021-04-19

5,562 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 (3)

2020-04-14

10,244 reads

Blogs

Storage Field Day 23 – HammerSpace

By

I am thrilled to have been a part of this year’s Storage Field Day...

Daily Coping 16 May 2022

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

SQL Saturday Jacksonville Slide Decks

By

Here are the slide decks for my sessions at SQL Saturday Jacksonville 2022 Continuous...

Read the latest Blogs

Forums

EXECUTE SSIS Pacakge from command line with environment variables

By komal145

hi, I am trying to execute ssis package from command line. I also tried...

SQL Server replication migration from sql 2012 to 2019

By SQL_Hunt

Hello I need to migrate existing sql server 2012 replication to the SQL Server...

Failed code dcexec -u -s 3 -i "$(ESCAPE_DQUOTE(MACH))\$(ESCAPE_DQUOTE(INST))"

By juliava

Hello,   I cant understand what this code is doing, can some one please...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers