All Questions
Tagged with open-json sql-server-2016
18
questions
-1
votes
1
answer
138
views
Parse JSON from tsql
I need to parse JSON using TSQL.
I find a function to create a temporary table contains all values of the json and the mode to find every elements of it.
Not there are an issue. I have a JSON with an ...
0
votes
1
answer
170
views
OpenJson store processed object in original form
DECLARE @JSON NVARCHAR(MAX) = N'[
{
"OrderNumber":"SO43659",
"OrderDate":"2011-05-31T00:00:00",
"AccountNumber":"AW29825",
"ItemPrice&...
1
vote
1
answer
29
views
How to insert only a portion of the JSON element into a SQL field
I'm using the following code in a SQL Server 2016 stored procedure and I would like to split the Journal ISSN value into 2 different fields.
DECLARE @json nVARCHAR(MAX) =
'[{"Journal ISSN" : "...
0
votes
1
answer
5k
views
OPENJSON with dynamic JSON key value pair
we are having a JSON document, where week numbers are dynamic keys. We want to load them to a relational table.
We are able to achieve relational resultset, if we hardcode the weeknumbers, as given ...
1
vote
1
answer
1k
views
Loop through JSON in SQL Server 2016
I have a following JSON
{
"href": {
"host": "localhost",
"port": 2222
},
"name": "20190812",
"scheduledStartTime": "2019-08-12T12:22:52.500-04:00",
"parameters": {
"1251226": {
...
-1
votes
2
answers
52
views
JSON SQL Server 2016 parse
I have a nested JSON as output form a form and I need to parse it in order to send it in joined tables. I cannot parse some of the data I have in the JSON: labels, rangesValues or body I get NULL
...
0
votes
1
answer
70
views
Parse JSON String with TSQL
I'm a little confused about how to parse a JSON string with TSQL.
I've been watching Youtube movies for hours, but unfortunately I haven't found a solution yet.
This is the JSONstring:
{"event":"...
1
vote
1
answer
3k
views
How to get json object property without using OPENJSON
Following is my script to get specific value(OldPTValue, NewPTValue) from
table HistoryTracking.
I'm using OPENJSON but getting compatibility issue.
Is there any way to get data without using OPENJSON ...
0
votes
1
answer
53
views
Pass JSON directly to SQL Server 2016
I would like to pass an JSON object to a SQL Server 2016 stored procedure without deserializing the object and let the database process the data.
I'm passing in:
DECLARE @json NVarChar(2048) = N'[{...
2
votes
1
answer
1k
views
A concatenation OPENJSON in a SQL Server 2016 stored procedure
I need to combine all of the authors for a particular UID. The basic fields are working from the code at another post.
DECLARE @json NVARCHAR(MAX)
SET @json = '{
"header": {
"...
0
votes
1
answer
1k
views
OPENJSON syntax in a stored procedure in SQL Server 2016
I'm following the last example on this page https://www.sqlservercentral.com/forums/topic/using-msxml2-serverxmlhttp-within-stored-procedure-to-grab-source-of-html-page-and-save-to-table.
It pulls ...
0
votes
1
answer
3k
views
OPENJSON not available on SQL Server 2016 with compatibility level set to 130
I am attempting to use OPENJSON in a database that is running on SQL Server 2016, and get the following error when running this simple test query (which works fine on a different 2016 database)
...
0
votes
3
answers
958
views
OPENJSON does not select all documents into the SQL table
I have been trying to export the contents of a JSON file to an SQL Server table. However, despite the presence of multiple rows in the JSON, the output SQL table consists of only the first row from ...
2
votes
2
answers
1k
views
How to parse JSON string recursively with openjson
I have the following JSON data :
set @json = N'{
"Book":{
"IssueDate":"02-15-2019"
, "Detail":{
"Type":"Any Type"
, "Author":{
"Name":"...
0
votes
1
answer
126
views
Importing nested name-value pairs from json into SQL Server
I am importing a json file into SQL 2016 which has some nested name-value pairs in a nested values structure. It's the values from these pairs I am having problems with, such as .
{ "name": "Colour", ...