Recursive CTE

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

385 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

Transaction log Information gathering

By

Here are the different ways to know the tlog file related information sys.dm_db_log_stats –...

What's New in SQL 2019? at BRSSUG

By

Thanks to everyone who joined the BRSSUG for a night all about SQL Server...

Data Lake Architecture using Delta Lake, Databricks and ADLS Gen2 Part 3

By

This is the third post in a series about modern Data Lake Architecture where...

Read the latest Blogs

Forums

MSAccess to SQLServer Query Conversion

By Whizkid

Hi, Our client have MS-Access database which has more queries written in MS-Access 2010...

Log file growth

By Admingod

Index maintenance and loading data conflict with each other cause the log file to...

comparison operator in count() is not working

By satishpatro

SELECT 15 > 14 FROM Duel; Working in MySql but not in SqlServer SQL...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers