Questions tagged [insert-update]
A mixed flavour of data entry mode and data modification mode. It can be used when insert is required for case of non-existing data and modification if data exists.
insert-update
1,310
questions
-1
votes
1
answer
73
views
i can't add column from query to table as new column (postgresql)
I selected only digit from column and want to add this new column to my table with selected digits
SELECT
left(orgi.dt_new, strpos(dt, ' ') - 1) AS day_
FROM
(SELECT *,
CASE
WHEN ...
1
vote
1
answer
604
views
Interactive Grid in oracle apex
How can I handle insert update in Oracle Apex interactive grid with more than one table which is attached with inner join. If anyone have solution please reply.
0
votes
1
answer
143
views
SQL to update rows to remove words with less than N characters
I have a TAGS column in my Products table in SQL Server. In my web project I split them with space, for example:
"web web_design website website_design"
=> 1.web 2. web_design 3. ...
0
votes
1
answer
148
views
Update SQL table using selection from another table
I want to update the values of a SQL table based on the value from another table where the two tables have a common ID.
When I run my script it says it work. But when I check the table that should ...
0
votes
2
answers
1k
views
Import [insert or update] Excel/CSV to MySQL database using maatwebsite in laravel 7
While importing/uploading an excel file, if the data is already present in the excel file then update it in the Database or else insert it. This means before inserting should check with the database. ...
0
votes
2
answers
122
views
How to insert data into table with composite unique keys
I have a table demo where I have 5 columns as below:
Create table demo
(
Demo_id number,
demo_a number,
Demo_b number,
Demo_c number
)
So here demo_id is surrogate PK and ...
3
votes
2
answers
2k
views
Difference between the UpdateOne() and findOneAndUpdate Methods in Mongo DB
What is the difference between the UpdateOne() and the findOneAndUpdate() methods in Mongo DB?
I can't seem o understand their differences. Would appreciate it if a demonstrative example using ...
0
votes
1
answer
251
views
Using IF inside an Oracle trigger to change the update value
I'm trying to change the value of the update field within an IF statement when the new value does not match the backup column value.
Can't figure it out, anybody done something like this before?
edit :...
-1
votes
1
answer
190
views
Syntax error near on while using SQLITE on conflict clause
Here is my syntax where I am trying to update data if already exist but here I am not getting Why this error is coming up I am using SQLITE3.
Can anyone help me with my issue or can suggest me better ...
1
vote
1
answer
434
views
Swap elements in a MongoDB array given only their ids (in-place)
I read some threads about it, such as this one and that one, but they both come with major flaws & caveats (to me at least).
What I want is simple! An update query that:
swaps 2 elements in an ...
0
votes
1
answer
331
views
PHP Oracle not inserting data into the database
I'm trying insert the data into the oracle database by input tag which is inside the table tag but the the data is not inserting for some reason. Used multiple table tags inside the form tag. But data ...
0
votes
1
answer
1k
views
INSERT ... ON DUPLICATE KEY UPDATE causes Deadlock Exception in Mysql 5.7
We are having a mysql table like below
CREATE TABLE student_subject (
student_subject_id int(11) NOT NULL AUTO_INCREMENT,
student_id int(11) NOT NULL,
subject_id int(11) NOT NULL,
version int(...
0
votes
0
answers
287
views
SQL Update and Insert New records if not existing
Hi I am using Microsoft SQL Server 2019 (RTM-GDR) (KB4583458) - 15.0.2080.9 (X64) Nov 6 2020 16:50:01 Copyright (C) 2019 Microsoft Corporation Express Edition (64-bit) on Windows Server 2019 Standard ...
0
votes
1
answer
400
views
Error. How can i make live table update and delete using ajax in laravel
i try to make editable role in user table but its error and not update data to database
here the error
this is my blade
<div class="table-responsive">
@csrf
<table ...
0
votes
1
answer
556
views
Hibernate batch update issue
For a simple batch update of a MariaDB table, properly mapped as a Hibernate entity class, a simple update via Hibernate produces the error
org.hibernate.StaleStateException: Batch update returned ...