Questions tagged [json-value]
77 questions
1
vote
2 answers
SQL SERVER JSON text is not properly formatted. Unexpected character found at position 0
Many have this problem, however it's usually because the JSON is incorrect. Can anyone tell me why this does not work. I expect to get a result set of:
ONE FirstName LastName
1 John Smith
Instead, I get an empty result set and the…

Louis Loglisci
- 11
- 1
- 2
1
vote
1 answer
Is there any alternative for JSON_VALUE in SQL Server 2014?
Is there any alternative for JSON_VALUE in SQL Server 2014?
JSON_VALUE is supported SQL Server 2016 and higher. How can i achieve that?

Muhammed Yalçın
- 39
- 1
- 6
1
vote
0 answers
Rocket.rs route alternative to JsonValue
I changed my version of Rocket 0.4.2 to 0.5rc, and my Result

jenoh
- 165
- 3
- 17
1
vote
0 answers
how to convert json to row and column format using oracle
{ "Message ": [ { "PACK_NO": "219069571", "COMPONENT_ITEM": [ { "ITEM": "308187417", "PACK_QTY": 2 } ] }, { "PACK_NO": "219069572", "COMPONENT_ITEM": [ { "ITEM": "308187419", "PACK_QTY": 2 } ] }, { "PACK_NO": "219178060", "COMPONENT_ITEM": [ {…

Ravi_Deshmukh
- 21
- 3
1
vote
1 answer
Use of JSON_VALUE to return a JSON value containing \n as the newline character
Consider the following T-SQL in Microsoft SQL Server:
SELECT JSON_VALUE ('{"Value": "Normal Text 304\n1212\n1212\n121\na"}', '$.Value')
When this is executed, \n is converted to ASCII 10 (line feed) in the data, and it returns the following:
Normal…

Alan
- 11
- 1
1
vote
1 answer
JSON obtain value from key in Python
I have this Python script:
import json
from cinbase.walle.client import Client
apiKey = foo
mysecret = bar
client = Client( apiKey, mySecret )
price = client.get_spot_price(currency_pair = 'BTC-EUR')
This is my output:
{
"data" :{
…

Bender
- 49
- 6
1
vote
1 answer
Convert select result that has JSON field to JSON and use that data with JSON_VALUE()
I have a table that has some columns.
One of these columns stores data in JSON format.
I select a row from this table with FOR JSON AUTO.
My problem is that SQL Server puts quotations around the value of JSON properties but I don't want this;…
1
vote
2 answers
How to loop array of objects from table column?
Table columns :
id
---------
details
My table column details has json object like
"data" : [ {
"name" : "luke",
"dob" : "12-10-90",
"addr" : "sample1",
},
{
"name" : "sam",
"dob" : "12-10-88",
"addr" : "sample2"
}
]
I…

DLV
- 553
- 2
- 6
- 17
1
vote
2 answers
Oracle - JSON_VALUE returns NULL
I have a JSON string as below, and when I run the following query, it does not return anything. The JSON is valid, so am I missing something?
SELECT JSON_VALUE(json_content, '$.section_1') FROM…

Landon Statis
- 683
- 2
- 10
- 25
1
vote
2 answers
Read Json Value from a SQL Server table
I have a Json value stored in SQL server table as ntext:
JSON (column: json_val):
[{"prime":{"image":{"id":"123","logo":"","productId":"4000","enable":true},"accountid":"78","productId":"16","parentProductId":"","aprx":"4.599"}}]
select…

kayeesp
- 55
- 2
- 9
1
vote
1 answer
Between clause on Array of numerical values in row for JSON type column
I have a table with single column containing JSON type objects (column type nvarchar) and have a requirement of filtering rows.
JSON object is an array of objects containing multiple fields, Is there a way I can apply between clause on each value of…

SJ1
- 344
- 3
- 12
1
vote
1 answer
SQL Server: is it possible to use JSON_VALUE within GROUP_BY?
I tried to use JSON_VALUE within GROUP_BY clause and got this error:
JSON text is not properly formatted. Unexpected character 'b' is found at position 0.
When I use it only in SELECT, I get the expected result.
SELECT
COUNT(*),
Date,
…

Dana
- 107
- 9
1
vote
1 answer
SQL server: select all json array elements using JSON_QUERY
I have a column myColumn in myTable table with this value:
"6285":[
{
"75963":{"lookupId":"54","value":"0","version":null},
"75742":{"lookupId":"254","value":"991","version":null}
}
]
I need to write…

Mukhamedali Zhadigerov
- 811
- 1
- 15
- 32
1
vote
1 answer
TSQL How do i check array is a subset using JSON_QUERY
I have the following Table Documents where data is stored in JSON format.
DocumentID Status Data
------------------------------------------
1 Active '{ "AccountNumber":["A1","A2","A3","A4"] }'
2 Active …

LP13
- 30,567
- 53
- 217
- 400
1
vote
0 answers
Property Name via Sql Parameter for Json_Value?
I have this
var d = $"'$.{ propertyName}'";
var propertyNameParam = new SqlParameter("@propertyName", d);
var sql = "select * FROM Items WHERE JSON_VALUE(Attributes, @propertyName) like '%5151515151%'";
count = dbContext.Items.FromSql(sql,…

chobo2
- 83,322
- 195
- 530
- 832