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

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

1,076 reads

Blogs

Azure SQL Managed Instance Versions

By

Just a really quick FYI for the readers. If you are using Managed Instances...

A summary of new features in Azure SQL Database

By

It has been some time since I last wrote about Azure SQL Database. Although...

Daily Coping 23 Jun 2021

By

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

Read the latest Blogs

Forums

SQL Server 2019 Distributed Availability Groups

By DK

Hello.  I am looking into setting up a Distributed Availability Group between 2 availability...

Server Roles and Permissions

By Atat Rowcount

Hi guys Setting up a new SQL Server on Azure (Managed Instance).  I have...

trying to run an Batch file from a Job

By itmasterw 60042

Hi, I looked on the web and I just found the cod that I...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers