cross apply

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

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

631 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

Parse Data from a Field Containing Multiple Values using CROSS APPLY

  • Article

It is possible for a field in a character-delimited text file to contain a list of further-delimited values instead of the customary single value. This article demonstrates how to load such a file into a staging table, then use a CROSS APPLY query to parse the list of values into a related table.

3.27 (15)

2019-06-07 (first published: )

9,338 reads

Blogs

Social: Going Along to Get Along

By

It’s the eve of the Fourth of July, when the Declaration of Independence is...

Daily Coping 3 Jul 2020

By

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

Using Docker Volumes for SQL Server in Linux

By

No, not that kind of volume! Over the past couple of blog posts, I...

Read the latest Blogs

Forums

Pintable into cache

By mtz676

Pintable into cache to avoid fragmentation I have a table(OLTP database) which gets fragmented...

stored procedure to delete user and login

By SZ

I was trying these but it does not work: USE [MyDatabase] GO /****** Object:...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers