Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering SQL Server 2017

You're reading from  Mastering SQL Server 2017

Product type Book
Published in Aug 2019
Publisher Packt
ISBN-13 9781838983208
Pages pages
Edition 1st Edition
Languages
Concepts
Authors (5):
Miloš Radivojević Miloš Radivojević
Profile icon Miloš Radivojević
Dejan Sarka Dejan Sarka
Profile icon Dejan Sarka
William Durkin William Durkin
Profile icon William Durkin
Christian Cote Christian Cote
Profile icon Christian Cote
Matija Lah Matija Lah
Profile icon Matija Lah
View More author details
Toc

Table of Contents (20) Chapters close

Title Page
Copyright Contributors About Packt Preface 1. Introduction to SQL Server 2017 2. SQL Server Tools 3. JSON Support in SQL Server 4. Stretch Database 5. Temporal Tables 6. Columnstore Indexes 7. SSIS Setup 8. What Is New in SSIS 2016 9. Key Components of a Modern ETL Solution 10. Dealing with Data Quality 11. Unleash the Power of SSIS Script Task and Component 12. On-Premises and Azure Big Data Integration 13. Extending SSIS Custom Tasks and Transformations 14. Scale Out with SSIS 2017 1. Other Books You May Enjoy

Extracting values from a JSON text

As mentioned earlier in this chapter, JSON has four primitive types (string, number, Boolean, and null) and two complex (structure) types: object and array. SQL Server 2016 offers two functions to extract values from a JSON text:

  • JSON_VALUE: This is used to extract values of primitive data types.
  • JSON_QUERY: This is used to extract a JSON fragment or to get a complex value (object or array).

JSON_VALUE

The JSON_VALUE function extracts a scalar value from a JSON string. It accepts two input arguments:

  • Expression: This is  JSON text in the Unicode format.
  • Path: This is an optional argument; it is a JSON path expression and you can use it to specify a fragment of the input expression.

The return...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}