81 questions
0
votes
0
answers
15
views
algorithm to validate complex json data in a table which stores json key value pairs in column ,use it in another table which stores parent child data
1.extract all the key value pairs - suggest option which can be reused (temp table,CTE,or more suitable)
2.write a query which takes one key value at a time and searches for the value in another table ...
0
votes
0
answers
53
views
SQL Server selecting JSON attribute from a single array as multiple rows
Is there a way to select an attribute from a JSON document as multiple rows in the result? What I mean by this:
select JSON_VALUE(detailsColumn, '$.books[*].name') as Value
from authors
where id = '...
0
votes
0
answers
58
views
Where clause select in unknown nested JSON column
I am storing unknown JSON in a SQL Server varchar(max) column. Here are some samples of my JSONUDF column:
JSONUDF
{"1":{"Department":"daves","AVMPersonID":&...
0
votes
1
answer
739
views
"com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of" error even though constructor exists
I have this Java enum:
public enum UserTypeEnum implements EnumConverter {
USER(1),
USERS_GROUP(2);
private final int type;
UserTypeEnum(int type) {
this.type= type;
}
@Override
@JsonValue
...
1
vote
1
answer
284
views
Typescript JSON type not working properly (recursive type definition problem?)
I created a legit JSONValue type with some recursive logic. I've tried everything and read a lot of documentation, still don't understand why this not works as expected (the compiler doesn't complain ...
0
votes
1
answer
119
views
Parsing a complex JSON GET CALL USING ORACLE JSON_TABLE
I have a following GET call response.
{
"PrepaymentIncludedonInvoiceFlag": null,
"ReferenceKeyTwo": null,
"ProductTable": null,
"links": [
{
&...
0
votes
3
answers
134
views
How to build JSON with selected fields from JSON columns in SQL Server keeping fields type
I have JSON like this:
{
"_key": {
"id": "3b8d1ed7-c3ec-32ec-a083-2ddc17152e94",
"rootId": "15c85327-9628-3685-b84a-375b546ba92a"
},
...
0
votes
2
answers
712
views
How to build new JSON with JSON_VALUE in SQL Server? Can't set value type
I have JSON like this:
{
"_key": {
"id": "3b8d1ed7-c3ec-32ec-a083-2ddc17152e94",
"rootId": "15c85327-9628-3685-b84a-375b546ba92a",
},
&...
0
votes
2
answers
198
views
Equivalent of the $[*] jsonpath for SQL Server?
I would like to use a JSON path like $[*].name or $[..].name on a JSON like this one:
[
{"id": 1, "name": "John"},
{"id": 2, "name": "...
0
votes
2
answers
88
views
JSON query returns data until I search for it
I have a table (code_table) with a lot of different types of records and values. One of the type of records contains a json field (but not all). The following returns the records with json fields:
...
0
votes
0
answers
138
views
How to remove a property name of a JSON with @JsonValue without deleting more properties of my object
I try to make a JSON with a 3 propertys, "items", "status" and "id", but if i use @JsonValue, my JSON don't take "status" and "id"; How can i make ...
0
votes
1
answer
1k
views
Extract first value from a JSON dictionary in SQL Server
I have various translations stored in a JSON dictionary. I extract the values with JSON_VALUE (for that example I use a variable instead of a column. In real life it is a nvarchar(max) table column):
...
0
votes
3
answers
4k
views
How to fetch nested data using JSON_VALUE when it contains an array of objects
I have a table MYTABLE which has 3 columns as mentioned below.
|id | myclob_column | column3|
It has one column (myclob_column) which is clob data (json). Sample clob data is below.
{
"name"...
1
vote
2
answers
1k
views
Extract value from a JSON array with no name
I have a table with a record that has JSON content and it is an array with no name. Sample data looks like this:
carId
carType
parts
Z003
Company
[{"Value":"New","Type":&...
0
votes
1
answer
337
views
Fetching object multiple levels in JSON array using JSON_QUERY in MariaDB do not work
I have the following table in a mariadb database
| model_id | model_name |model_json |
then on the field model_json I have the following json
{"class":"GraphLinksModel",
"...