OPENJSON

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

737 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,029 reads

Blogs

The Book of Redgate–Being Reasonable

By

As a part of the Book of Redgate, we have a series of (red,...

Azure Data Factory Pipeline Debugging Fails with BadRequest

By

I recently had a new pipeline fail. It was actually a copy of an...

Unlocking Real-Time Financial Insights: The Power of Microsoft Fabric

By

Microsoft Fabric is transforming real-time analytics for financial institutions. It provides a unified data...

Read the latest Blogs

Forums

Feeling your age? How would you know?

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Feeling your age? How would...

Sever Migration

By Arjun SreeVastsva

Hi, one of my server configured with Standard_D64ds_v4 what is next level of version...

Changing Machine Type

By Arjun SreeVastsva

Hi, presently my azure server running under Standard_D64ds_v4 .i am planning to upgrade the...

Visit the forum

Question of the Day

Rolling Back CUs

Can I rollback a cumulative update and remove it from my SQL Server instance?

See possible answers