Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
1 answer
28 views

Filtering mysql data using nested json_table returns "Incorrect arguments"

I'm new to mysql and I'm trying to filter some data. I needed more entires to be in one column, so I used the json format. With the help of chatgpt I'm able to search for fine, but there's a problem ...
user648200's user avatar
0 votes
0 answers
10 views

MySQL JSON_VALUE fails with a path starting with a number? [duplicate]

SELECT JSON_VALUE('{"dateTime": "2024-07-21 08:11:07 -0600", "60SecInches": 0.00, "DailyInches": 0.01, "TotalInches": 10.61}', "$.60SecInches&...
Dirk's user avatar
  • 129
1 vote
2 answers
70 views

How to count values from a column with JSON content?

I have a table with singers and each singer can be linked to many musical styles. Musical Styles are in a TEXT column, but the content of the column has JSON format. I want to count the number of ...
Sébastien Merour's user avatar
1 vote
1 answer
32 views

JSON_ARRAY_INSERT function in MySQL is enclosing new JSON in double quotes

Below is a snippet of a MySQL Script mysql> SET @j1 = '[{"Documents": []}]'; mysql> SET @j2 = '{"rc":{"DisplayName":"Registration Certificate","...
Kumar Kush's user avatar
  • 2,576
0 votes
0 answers
52 views

Could not write JSON: Infinite recursion (StackOverflowError)

I am developing a web project with spring boot using jpa, I have a problem using swagger and testing an api of mine named getAppointmentById, I tried using @JsonIgnore, @JsonManagedReference, @...
Nguyen Le Hoang Chinh Chinh's user avatar
0 votes
0 answers
22 views

Create mysql table from json string when 1st dimension hold columns and 2nd dimension holds rows

I am sitting with a legacy database and im trying to create this table in mysql using json strings stored in the database. I have a table that stores a massive json string and one of the keys inside ...
Nico's user avatar
  • 1
0 votes
1 answer
45 views

mysql/mariadb JSON_VALID

Example given here at db-fiddle. CREATE TABLE `oa24_json` ( `id` int(11) NOT NULL AUTO_INCREMENT, `appnum` varchar(8) NOT NULL, `oa_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT ...
Scavokovich's user avatar
0 votes
0 answers
26 views

MYSQL Where IN not working if the parameter is taken/converted from json string [duplicate]

I have a table something like this id name 1 A 2 B 3 C I'm trying to filter it by using WHERE IN from a json string with something like this: SELECT id, name FROM ref_finding_criterias WHERE id ...
IkouKuhn's user avatar
0 votes
0 answers
26 views

How to retrieve JSON data from MySQL by cursor? [duplicate]

I have a table which storing JSON data in it, Table Services | ID| Details | Time | A | {a:"2",b:"2",c:"3"} | 16-06-2024 00:00:00 | | A | {a:"2",b:&...
Hokyao Chan's user avatar
0 votes
1 answer
40 views

What is the best way to insert JSON into MySql in a Wordpress PHP function?

I have a JSON object of around 1000 items, each with 20 keys, retrieved from a public API. From WordPress PHP code (i.e. plugin or code snippet), what is the best way to get that into MySQL? The code ...
Timbo's user avatar
  • 355
0 votes
0 answers
39 views

MySQL loss precision while converting json string to double

similar problem: MySQL JSON column loses decimal precision when JSON object inserted as a string literal env: local hosted MySQL 8.4.0 by using Docker I create a table with DOUBLE and JSON columns ...
dacapo1142's user avatar
0 votes
0 answers
94 views

SQLSTATE[22032]: <<Unknown error>>: 3140 Invalid JSON text: "Invalid value." at position 0 in value for column 'products.product_active_matterials'

I got this error while inputing data through form in my laravel project that some column in database having json datatype. Below are my inputed value and here is my table structure. ...
XYZ.Currate's user avatar
1 vote
1 answer
64 views

How can I turn a literal into an expression in SQLAlchemy for MYSQL?

I'm using sqlalchemy to create a table in mysql. I would like to have a JSON column, with a default value, but mysql doesn't allow literals to be the default value, only expressions. If I create the ...
mazalan01's user avatar
0 votes
1 answer
32 views

Stringified JSON data won't INSERT into mySQL(verified json format)

I'm not able to insert a JSON string into a mySQL table. CREATE TABLE registered ( id int NOT NULL AUTO_INCREMENT, name nvarchar(128) NOT NULL, panels JSON NOT NULL, PRIMARY KEY (id) );...
Jeri's user avatar
  • 3
0 votes
1 answer
68 views

How can I split a database table into two?

I have a database table. There are quiz questions and 40 thousand records. In the table; There are columns id, questionid, question, answer a, answer b, answer c, answer d and correct answer. Now I ...
user's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
596