59 questions
1
vote
1
answer
81
views
postgresql json arrays combine and group and sort
Please suggest me a solution to a certain problem. I have two tables. One is stored on one server, and the other on another. And I need to combine their data on daily statistics once in a while. The ...
0
votes
2
answers
150
views
Oracle 19c how to write a stored procedure with JSON output, I'm having trouble formatting the query to return a specific JSON object
The issue when I don't use AGG type I get a 'ora-01422: exact fetch returns more than requested number of rows using a json_object put into clob so using JSON_ARRAYAGG works I just haven't been able ...
2
votes
2
answers
552
views
JSON_ARRAYAGG returns a truncated list of data
I am trying to create a JSON output but it is displayed truncated.
Table creation and inserts:
create table test(c1 number, c2 varchar2(10), c3 varchar2(100));
begin
for i in 1 .. 1000 loop
...
0
votes
1
answer
96
views
How does React State with json arrays affect performace
I am learning react and I am building an application that has a json array in a state variable. Since react doesn't seem to re-render the page of a json array state variable with out making a copy of ...
0
votes
1
answer
61
views
How do you find or locate just part of the JSON Key name
I am having a hard time getting the JSON Key name. Because the whole name is not fixed. I would like to get the media_id_ but the problem is the numbers next to it is not fixed/static.The goal I am ...
2
votes
1
answer
434
views
Dynamic Column List in JSON Query in Oracle
I'm looking for a way to create/pass a dynamic column list for use in generating a JSON document.
Creating the following (on Oracle 19c):
CREATE TABLE tbl1 (val1 varchar2(10), val2 varchar2(10), val3 ...
1
vote
4
answers
258
views
Oracle JSON_ARRAYAGG doesn't support DISTINCT keyword
SELECT key1, key2, JSON_ARRAYAGG(foo) foo, JSON_ARRAYAGG(bar) bar FROM (
select 1 as key1, 2 as key2, '1.0' as foo, 'A' as bar from dual
UNION
select 1, 2, '2.0' , 'A' as bar from dual
UNION
select ...
0
votes
1
answer
302
views
PLSQL : for loop json_arrayagg to json
I have an emp table, i.e.
insert into emp(id,name,salary) values (1,'name1',1000);
insert into emp(id,name,salary) values (2,'name2',2000);
insert into emp(id,name,salary) values (3,'name3',3000);
...
0
votes
1
answer
42
views
Can't figure out a triple joint with group by
I want to get the Creators of Artworks, GROUP BY by their role.
I find a way to have the list of the Creators with their role, for each Artwork.
SELECT
JSON_OBJECT('id', a.IDartwork, 'creaDate', ...
-1
votes
1
answer
377
views
How to convert TSV data to JSON Object in java
TSV Data :
Required OutPut :
[{
candidates: {
id:"agent_4",
text = "can i get a confirmation code",
count = 2},
{
id:"agent_11",
text = "text_2",
count =3},
}]
...
2
votes
1
answer
2k
views
Skipping JSON_ARRAYAGG array when one of the value is not available-In Oracle
I am working in JSON_ARRAYAGG in Oracle .I have a scenario that Json array have 2 attributes.
One attribute is hardcode value another one fetches value from outer query .
I want to skip whole ...
0
votes
1
answer
98
views
How to parse array values from Json in Jmeter
For the below response I need to fetch the rideId and pass it to the next request in Jmeter.Also ,the API that generates below response should be executed until the eventType is HANDSHAKE.
[{"id&...
1
vote
1
answer
460
views
Conditional check for Json array in Karate framework
Want to validate in Karate framework
For the below Json What I want to validate is,
if "isfilter_regex":0 then "msgtype": "##regex ^[A-Za-z0-9_.]-/*"
or if "...
0
votes
1
answer
1k
views
I want to extract the value from JSON by same id one id using java
So the json look like this
{
"cover":"AddressBook",
"Addresses":[
{
"id":"1",
"NickName":"Rahul",
&...
0
votes
0
answers
77
views
How To Convert Result Table to JSON in MySQL with Multiple Table Join
I have MySql Query like this:
SELECT product_list.id AS listId,
product_list.class AS listClass,
product.prod_name AS prodName,
product.prod_url AS prodUrl,
product....
0
votes
0
answers
149
views
JSON_ARRAYAGG returns itself as key
Given the following query:
SELECT JSON_ARRAYAGG(
JSON_OBJECT(
"empresa_id", agenda.empresa_id,
"nombreemp", agenda.nombre_empresa,
"personas&...
-3
votes
1
answer
49
views
How To Get Json object inside json object
My code snippet for nested json object:
JsonArray arr = jsonObject.getAsJsonArray("data");
for(int i = 0; i < arr.size(); i++) {
String _Id = arr.get(i).getAsJsonObject().get("...
0
votes
1
answer
220
views
How to return total amount of colors without interfering with JSON_ARRAYAGG and LIMIT in FROM subquery
The product has two colors (Black and White)
I would like to use a LIMIT to not bring all the colors... and the amount of colors would be the total
Example:
LIMIT 1 would return:
colorsName: "[{...
0
votes
1
answer
1k
views
T-SQL parse JSON array without property name in SQL Server
Environment
SQL Server 2016
Windows 2016
I'm currently getting information from an API. When I call this API, I get the following JSON text back:
{"request":{"command":"...
0
votes
0
answers
363
views
SQL json_arrayarg with json_object producing duplicate values
This SQL query gives me same values repeatedly:
select json_object('id',basics.resume_id,
'work',JSON_ARRAYAGG(json_object('name', work.name, 'location', work.location,
'description', work....
0
votes
1
answer
259
views
How can we get result as Json array in ORDS?
Is there any possibility to get JSON array instead of JSON object as a result while calling REST API which is built by using Oracle Rest Data Services(ORDS)??
0
votes
1
answer
140
views
how to set Text of total amount of prouduct which got from API?
I want to display total amount of product which I got from API. Here is the code which i implemented. Error shows that onErrorResponse: org.json.JSONException: Value Final:92 of type java.lang.String ...
1
vote
1
answer
247
views
Oracle Cloud DB 19c bug with JSON_ARRAYAGG
I try to use JSON_ARRAYAGG into select and get bug result with the same data
SELECT json_object(
'buy' VALUE JSON_ARRAYAGG(b.buysum),
'total' VALUE JSON_ARRAYAGG(b.totalsum)
)
...
0
votes
1
answer
862
views
MYSQL query to get array list with each row having different children
Lets say we have three tables
category_level_one
id
cat_name
1
Physics
2
Chemistry
category_level_two
id
sub_cat_name
cat_l1_id
1
Organic
2
2
Inorganic
2
3
Physical
2
4
Mechanics
1
5
Electricity and ...
0
votes
1
answer
509
views
MariaDB JSON_ARRAYAGG gives wrong result
I have 2 problems in MariaDB 15.1 when using JSON_ARRAYAGG
The brackets [] are omitted
Incorrect wrong result, values are duplicates or omitted
My database is the following:
user:
+----+------+
| id ...