cross apply

SQLServerCentral Article

4.9 (10)

2022-07-13

8,780 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. 

2019-11-25 (first published: )

530 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. 

2019-11-12 (first published: )

1,644 reads

SQLServerCentral Article

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

12,080 reads

Blogs

New Job -> Week 2 -> Creating a Checklist

By

This is part of a series of new job blog posts. You can find...

SQL Server 2022 Administration Inside Out

By

SQL Server 2022 Administration Inside Out is now available for pre-order from Microsoft Press. This...

WIT/DEI Mental Health and Wellness Day Challenge to Present

By

Back in December 2019, I started presenting my session on mental health with lots...

Read the latest Blogs

Forums

Managed Instance Link and SQL Server 2022

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Managed Instance Link and SQL...

Passing parameters to query without TVFs

By seanachim@hotmail.com

Comments posted to this topic are about the item Passing parameters to query without...

Capturing Data Changes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Capturing Data Changes

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers