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

746 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,034 reads

Blogs

Do Yourself a Favor, Check Out Woodler

By

I recently was privileged to speak at SQLDay in Wroclaw Poland… man, I love...

Vertically scaling SQL Server online in Kubernetes

By

One of the new features in Kubernetes v1.33 is the ability to resize CPU...

Stack Overflow & AI

By

I won’t try to pretend otherwise, I’ve had some mixed feelings about Stack Overflow...

Read the latest Blogs

Forums

What’s the Difference Between AWS RDS and DynamoDB?

By pratikhole

When comparing AWS RDS and DynamoDB, the core difference lies in structure and use...

Analyzing Tempdb Spills and Usage Across Recursive Queries

By shukla.chandan12

Comments posted to this topic are about the item Analyzing Tempdb Spills and Usage...

Creating a new API in Data API Builder

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Creating a new API in...

Visit the forum

Question of the Day

Creating a new API in Data API Builder

If I run "dab init" to create a new API over a database, what parameters are required?

See possible answers