FOR JSON

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. 

2019-11-24

266 reads

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. 

2019-11-12 (first published: )

602 reads

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

  • Revision

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. 

2019-11-08

1 reads

Blogs

More Azure Blob Storage enhancements

By

I recently blogged about Query Acceleration for ADLS, which also applies to Azure Blob...

Daily Coping 25 May 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

A Byte of Redgate–Bonus Queso Recipe

By

As part of the Community Circle effort at Redgate, we’ve released a cookbook: A...

Read the latest Blogs

Forums

HTML Mail with more than one line in Resultset

By tutter

Hello all, i would like to send a html Mail with sql server. But...

AS Tabular and Sample Data in VS

By philipp

Hello all, I really need your help – I want to use the sample...

SSIS Export Flat File as Fixed Width

By Oscar_Boots

Hi Forum, I have a table that uses the script below to create fields...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers