Recursive CTE

Technical Article

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. 

You rated this post out of 5. Change rating

2019-11-25 (first published: )

649 reads

Technical Article

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. 

You rated this post out of 5. Change rating

2019-11-12 (first published: )

1,858 reads

Blogs

T-SQL Tuesday: Encryption and Data Protection

By

I have the honour of hosting this month’s T-SQL Tuesday. In case there’s any...

Parameterize your Databricks notebooks with widgets

By

Widgets provide a way to parameterize notebooks in Databricks. If you need to call...

FDD 2023 – Session Materials

By

You can find the slides for my session at Future Data Driven summit at...

Read the latest Blogs

Forums

Alwyason availability group can set primary role permanently?

By SQL Galaxy

Hi. Two node windows clusters Node1 and Node2 and configured alwayson availability group. Will...

need some help with spilt raw data

By mxy

Hello,   I am trying to split data, looks like there is some special...

Backing Up a Restoring Database

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Backing Up a Restoring Database

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers