FOR JSON

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

696 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,933 reads

Blogs

Cloud Databases Made Simple: Creating Your First AWS RDS Instance

By

I recently started full time learning of Amazon Web Services (AWS). I found that...

First Time Speaking with a Mask at an Event

By

Over the past couple of months, I have started losing my ability to talk...

A New Word: Apolytus

By

apolytus– n. the moment you realize you are changing as a person, finally outgrowing...

Read the latest Blogs

Forums

Hardcoded filter vs filter by parameter

By blom0344

I am trying to set a date filter on several  large transaction tables to...

Do you listen to music when you work?

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Do you listen to music...

Slow update on temp table

By dpaproskijr

I have a job running each night starting at 4:30AM and usually finishing at...

Visit the forum

Question of the Day

Read Only Replica in SQL Server Standard

Our environment runs using SQL Server Standard. We are implementing Availability groups. Our database has been experiencing high read volumes, so I want to let the application read the Synchronized Secondary replica, as I read that HADR does this. Can we implement this?

See possible answers