OPENJSON

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

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

513 reads

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

  • Revision

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-08

1 reads

Blogs

Azure Storage tips

By

As a followup to my blog post Azure Data Lake Store Gen2 is GA,...

Managing Agent Jobs on Availability Group Servers

By

As always, the scripts in this post can also be found on our Git...

Permissions required for row counts to show up on Object Explorer Details

By

I ran into a rather obscure permissions problem the other day. Since I wasn’t...

Read the latest Blogs

Forums

Sql server Express 2017 and ssms

By kangarolf

Hi all, I've never used mssql express before but we had a small intranet...

Memory requirement

By Admingod

Looking for memory optimized tables. How would we know that the approx memory is...

Question on the use of schemas for access control

By chuck.forbes

I know that this is a long article, so, I totally understand if there...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers