CTE

SQLServerCentral Article

Navigating Trees With CTE

  • Article

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,400 reads

Blogs

I like KQL and I like managing my test data – are they mates?

By

Test Data Management (TDM) is essential in software development to ensure your application runs...

Full-Text Search in SQL Server: A Comprehensive Guide

By

Introduction Full-Text Search in SQL Server is a feature that provides linguistic search capabilities...

Reading JSON Data with Python

By

Recently I’ve been looking at archiving some data at SQL Saturday. As a start,...

Read the latest Blogs

Forums

Subscription to Oracle DB not working after upgrading subscriber to Oracle 19c

By rpalani65sql

Hi Replication and publisher configured on the same sql server 2022 version. Subscription to...

Script to Merger duplicate indexes

By EM2

Hello, I am trying to firgure out how to merge duplicate indexes using a...

using Openrowset to access delta files in ADLG2

By river1

Dears, I was told that I cannot access delta files in SQL Server Managed...

Visit the forum

Question of the Day

The Query Traceflag

If I want to enable a trace flag for a specific query, how do I do it?

See possible answers