cross apply

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

478 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,435 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: )

11,622 reads

Blogs

SQL Homework – July 2022 – Update your resume.

By

Resumes have been on my mind a lot recently. I’ve been thinking that I...

A Blogging Break

By

Outside of coping tips, I’m gonna take a break from blogging. I’ve been aiming...

Daily Coping 5 Jul 2022

By

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

Read the latest Blogs

Forums

Designing a table

By Johnson330

Hi, I have this list of training courses: Course_Code|Description 1 |Health and Safety 2...

Multiple Fact Tables

By yrstruly

Please assist? I would like to do a data model of the tables here:...

Drop database on Secondary Node from Primary for automatic restore job

By dennis.miller 20021

hi all We've ventured into the world of AAG's as we have now moved...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers