R Glen Cooper

  • Interests: SQL Server, .NET, Mathematics

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

17,618 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

6,683 reads

Blogs

Summit Launch Pricing Ends June 7

By

The PASS Data Community Summit is back in Seattle this November, the 14-17, 2023....

Masking Columns in Azure SQL and SQL Server: Safeguarding Sensitive Data

By

Information security and privacy are key in today’s data-driven world. Sensitive data needs to...

Tales From The Field Weekly Wrap Up for the Week of 05-22-2023 Microsoft Fabric Launch & Moving Home Offices

By

 Hello Dear Reader!  Sorry this is so late, moving houses has gotten me a...

Read the latest Blogs

Forums

Not wanting to use a Cursor, but...

By jwilkerson@valleymetro.org

Ok, need someone to talk me off the cursor ledge on this one. I...

Better Communication Through Less Messaging

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Better Communication Through Less Messaging

MuleSoft Integration with Azure Key Vault

By Sukanya Konatam

Comments posted to this topic are about the item MuleSoft Integration with Azure Key...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers