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

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

2,016 reads

Blogs

Choosing to not drive the Tesla

By

I started a short thread on Twitter/X and Bluesky recently after leaving the Tesla...

Advice I Like: Transactions and Relationships

By

Life gets better as you replace transactions with relationships. – from Excellent Advice for...

Free PostgreSQL Performance Monitoring with pgNow

By

I’ve been putting together a new PostgreSQL session called “Performance Monitoring for the Absolute...

Read the latest Blogs

Forums

Limits, Not Goals

By Grant Fritchey

Comments posted to this topic are about the item Limits, Not Goals

Making Additions and Changes; Getting Error Preventing Them

By Ahr Aitch

MS SQL Server/SSMS are my tools. As my project evolves I find I need...

SSL Certificate Chain

By suchit.d@promantia.com

SSL Certificate Chain Not Trusted Error in SQL Server Connection in Power BI I’m...

Visit the forum

Question of the Day

Precision and Scale II

What is the precision, length, and scale for an int variable?

See possible answers