All Questions
Tagged with open-json sql-server-2019
8
questions
0
votes
1
answer
61
views
Get element with newest date
I'm trying to get the element with the newest date from various JSON arrays. But I can't get it to work. It returns all the elements from the arrays. I have tried several things with MAX, TOP(1), ...
1
vote
2
answers
135
views
SELECT * FROM OPENJSON -- Not getting expected values
I am getting 0 row when selecting from OPENJSON below. I am expecting to get all 3 values "AA" for different as_of_date for CREDIT_RTG . I tried different select statements. I am running in ...
0
votes
2
answers
82
views
Convert JSON value in single row in TSQL 2019
I need help in transforming a string to json to put the values in separated lines.
Using tsql (2019)
How do I have to transform the provided data (payload) into a json to create the expected result or ...
0
votes
2
answers
158
views
Get different values from JSON array
I have a SQL table containing 2 columns - first Column is the ID of the users and the second column holds the JSON Phone information. The phone information consist of Work, Home phones and whether it ...
0
votes
1
answer
199
views
OPENJSON does not detect duplicated Value
I need to import and parse some sales records into the database.
Some customers have more than one product, therefore there are several orders with different product but with the same shipping address ...
0
votes
1
answer
1k
views
Extracting multiple values/levels from a json string in a SQL Server 2019 database table
Building on this post here
How can I achieve this in SQL Server 2019? I have an order table with a lineaggregate column that contains a json string with line item details of what was shipped. I need ...
1
vote
2
answers
2k
views
SQL Query to get the Json inside Json values by comma separated
I have the below Json object. I need to get the task names by comma (,) separated.
{
"Model": [
{
"ModelName": "Test Model",
"Object": [
{
"ID": 1,
...
0
votes
1
answer
4k
views
SQL Query on Json object inside multiple JSON objects
I have the below Json string. I need to write a query to get the TP records. Without providing the index value, we need get the result.
{
"S": [
{
"Name": "Project1",
"SP": [
...