APPLY

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

  • Script

This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node.  The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression. 

2019-11-24

372 reads

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

  • Script

This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node.  The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression. 

2019-11-12 (first published: )

897 reads

Blogs

2020 Advent of Code–Day 3

By

This series looks at the Advent of Code challenges. As one of my goals,...

Welcome to the Azure Data Community, empowered by Microsoft

By

After the Professional Association of SQL Server (PASS) unceremoniously closed down in January this...

Daily Coping 24 Feb 2021

By

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

Read the latest Blogs

Forums

SQL Server 2019 PMEM

By Steve Jones - SSC Editor

Comments posted to this topic are about the item SQL Server 2019 PMEM

Query Optimizer Suggests Wrong Index and Query Plan -- Why?

By Mike Byrd

Comments posted to this topic are about the item Query Optimizer Suggests Wrong Index...

UX Matters

By Steve Jones - SSC Editor

Comments posted to this topic are about the item UX Matters

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers