Common Table Expressions (CTE)

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

713 reads

Blogs

T-SQL Tuesday #178–A Recent Technical Problem

By

This month we have a good invitation from Deepthi Goguri, where she asks us...

WordPress.com and Developers: Roadmap Update

By

Where we've been and where we're going.

Redgate Clone Graduating Images

By

I wanted my own custom image in our internal Redgate Clone cluster, so I...

Read the latest Blogs

Forums

GIT Configuration and Automated Release for Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item GIT Configuration and Automated Release...

How to Add a New Shared Disk to a WSFC as a SQL Resource

By muhkam

Comments posted to this topic are about the item How to Add a New...

Setting Emergency State

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Setting Emergency State

Visit the forum

Question of the Day

Setting Emergency State

Which server role(s) can set a database to the Emergency State?

See possible answers