O'Reilly logo

SQL Server Advanced Data Types: JSON, XML, and Beyond by Peter A. Carter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Peter A. Carter  2018
Peter A. CarterSQL Server Advanced Data Typeshttps://doi.org/10.1007/978-1-4842-3901-8_8

8. Shredding JSON Data

Peter A. Carter1 
(1)
London, UK
 

In Chapter 7, I discussed how we can convert relational data into JSON documents, but what if we had to shred a JSON document (just as you learned to shred XML documents in Chapter 4) into a relational dataset? We could achieve this by using the OPENJSON() function. The OPENJSON() function accepts a single JSON document as an input parameter and outputs a tabular result set. The OPENJSON() function can be called either with or without specifying an explicit schema for the result set. OPENJSON() also supports the use of JSON path expressions. This chapter will examine each of these ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required