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

723 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,994 reads

Blogs

AI Helping with an API

By

Can an AI help me with some database API work? Let’s see. This is...

Creating a “Real” Copy of a View: #SQLNewBlogger

By

I saw a post where a developer was trying to read the Information Schema...

T-SQL Tuesday #181: A Technology Present

By

It’s the last T-SQL Tuesday of the year, and it’s amazing to think we’ve...

Read the latest Blogs

Forums

Query is filling Tempdb

By Nita Reddy

I have query which is filling TEMPDB I need suggestion how to modify this...

Script is filling Tempdb

By Nita Reddy

I have query which is filling TEMPDB I need suggestion how to modify this...

Date data type not recognized with oledb type provider

By blom0344

Hello, We recently made the following reservation working with  VS2022  combined with the SSIS...

Visit the forum

Question of the Day

The Hash Join III

In a hash join, if all the build input does not fit in memory, what type of hash join is this?

See possible answers