About 1,820,000 results
Open links in new tab
  1. sql - Convert select query results into Json - Stack Overflow

    Aug 11, 2018 · I want to execute a select query on a table and I need this result in a JSON format or in an excel sheet. I want to do this using query only and I'm using SQL Server 2014. Here is the table …

  2. Get Value From Json object contain table column using SQL Query

    22 I have a table Books with two columns Id, BookCategory in a SQL Server database, where Id is the primary key and BookCategory contains JSON object. This my table Books I'm trying to get table …

  3. SQL server: select all json array elements using JSON_QUERY

    What is your SQL Server version? If you can use JSON_QUERY(), you should be able to use OPENJSON().

  4. Extracting values from JSON text in SQL Server - Stack Overflow

    Note, that the reason for the NULL results is the fact, that B key in the input JSON is a JSON array, so you need to use JSON_QUERY() to get the whole JSON array and additional CROSS APPLY to …

  5. sql server - How can you select JSON object key values using SQL ...

    Jul 8, 2022 · There is a set of JSON functions available, most of them added in SQL 2016, and a pair more should be available in SQL Server 2022. If you want to erase the current structure and data in …

  6. How to use json column in the WHERE clause as a condition

    Aug 8, 2016 · The question is stated in the title and below is an example of the data insert into table A values('a','b', {'key':'value'}); And I would like to be able to select this row based on the key-value ...

  7. SQL Server json truncated (even when using NVARCHAR(max) )

    Jun 28, 2018 · So for example, the second query returns 2000~ characters, and those first ~2000 characters are identical to the first ~2000 characters of the first query. However, even the first query …

  8. sql server - Create nested JSON arrays using FOR JSON PATH - Stack …

    Dec 14, 2017 · I need to create a JSON output from a query that uses inner join between two tables with a one to many relationship. I would like the values of the secondary table to be nested as array …

  9. How to produce JSON strings from SQL Server queries via TSQL?

    SELECT JSON_QUERY(( SELECT [current],target FROM YourTable FOR JSON PATH )) Works well with minimal effort. I generally convert the output to a List<Dictionary<string,dynamic>> in C#/.Net (if …

  10. How to parse nested JSON array using SQL Server

    I am currently able to parse most of a JSON file using SQL Server's OPENJSON WITH (... syntax. However, this particular file contains nested arrays which I do not know how to handle.