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

621 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,784 reads

Blogs

Code signing for mere mortals

By

Well, turns out code signing is pretty complex, so I’m writing this blog post...

Blogging for the Tech Professional at Denver Dev Days

By

For those that attended my talk at Denver Dev Days, here are the slides:...

Getting AI Written Unit Tests

By

As a part of my AI experiments, I decided to ask CoPilot to write...

Read the latest Blogs

Forums

Software Flexibility (Avoiding the next hack)

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Software Flexibility (Avoiding the next...

Roles on tempdb

By cphite

A co-worker asked me a question today and I couldn't come up with an...

Delayed tcp acknowledgement registry setting

By Rasmus Remmer Bielidt

Our IT department contacted me recently and asked if they should change the default...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers