JSON support in SQL Server (read – write statistics) – Part 5

Loading Entire content of JSON file using  OPENROWSET (BULK) table-valued function, SQL Server will read the entire content of the file and insert it into SQL Server (Total Execution time = Time spent on Reading the full content of file + Writing the document into the table) In below example, Importing JSON file of size […]

JSON support in SQL Server (BULK INSERT INTO SQL SERVER) – Part 4

There are multiple ways to store JSON document into SQL Server. Such as writing the C# application to read JSON document and insert it into SQL Server, using SSIS script component with .net libraries, using PowerShell or T-SQL scripts. In this topic, I will try to cover all. Let’s start with T-SQL I have a JSON  […]

JSON support in SQL Server (path parsing) – Part 3

SQL Server support 2 modes of JSON parsing lax mode strict mode A JSON path that specifies the property to extract. If the format of the path isn’t valid, JSON_VALUE returns an error. JSON_VALUE returns a single text value of type nvarchar(4000). The collation of the returned value is the same as the collation of the input expression. If […]

JSON support in SQL Server – Part2

In this article, we will see how to read Object, Properties and Array values of a JSON document. Here is a simple JSON Document { “name”: “John”, “skills”: “SQL” } The above example has a simple object with two properties(name and skills). These two properties are separated by a comma. Now read the above JSON from […]

JSON support in SQL Server – Part 1

JSON stands for JavaScript Object Notation. JSON is very lightweight popular textual data format. JSON is also used to store unstructured data in log files or NoSQL database. JSON function in SQL Server enables you to combine NoSQL and relational database concept By using SQL Server built-in functions and operators, you can do the following […]