Steve Collins


Technical Article

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

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

668 reads

Technical Article

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

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,894 reads

Blogs

TryHackMe Advent of Cyber

By

I posted that I was thinking about the AdventOfCode this year, but wasn’t sure...

You should be running on SQL Server 2022

By

It’s me again with my apparently semi-annual blog post. This time we’re going to...

Removing a PowerShell Array Element–#SQLNewBlogger

By

I saw an article on this and realized I had no idea how to...

Read the latest Blogs

Forums

WHY Follow a LEFT OUTER JOIN with another LEFT OUTER JOIN

By YSLGuru

NOTE: The Topic Title probably isn't very good but I wasn't sure how to...

Replication Monitoring with Always On Availability Group

By sqlpops

Hey Folks, So I have SQL Transactional Replication set up on a database that's...

Powershell, how to convert file to txt pipe

By juliava

Hello, how can I change this code to txt pipe format? $DataSet.Tables[0] | Export-csv...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers