Recursion

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

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

845 reads

Blogs

Daily Coping 21 Jan 2021

By

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

It’s 2021, so why are you reading this?

By

If you’re reading this, there’s a good chance you’re straight, white, male, and English-speaking....

Daily Coping 20 Jan 2021

By

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

Read the latest Blogs

Forums

Snapshot Folder is not deleting automatically in Transactional Replication.

By dastagiri16

Hi Team, I created transnational replication to replicate the data from one server to...

A Beginning Project

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Beginning Project

Amend a Commit

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Amend a Commit

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Amend a Commit

See possible answers