Skip to main content

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
408 questions with no upvoted or accepted answers
5 votes
0 answers
5k views

How to use ListSerializer for create and update multiple records in django rest framework?

Here is the way to create and update multiple records at once in django rest framework using ListSerializer. This way is very sort and and give fast response. When you want to create a objects then ...
Bhautik Jivani's user avatar
3 votes
0 answers
2k views

MongoDB UpdateMany with multiple filters

Normally updateMany() in mongoDB works like this: db.coll.updateMany( <filter>, <update data>, {...other options}) What if I want to update X no of documents with X no of unique _id in ...
Niaz Ahsan's user avatar
3 votes
0 answers
1k views

mongoDB update query taking too long

We have a sharded cluster with 4 mongos, 3 config and two shards (each having 3 member replica-set). All mongo instances are on version 3.2. We have a timely job running every 5 mins that upserts (...
Vibhav Singh Rohilla's user avatar
3 votes
0 answers
77 views

How data can be fetched using php update operation?

I have coded an update operation, but I face problem with my code. When I click on edit button to update the data, the data cannot be fetched from the database and the field of the form is empty. Can ...
sunny's user avatar
  • 1,591
3 votes
0 answers
865 views

Trigger to return duplicate error in MySQL and to affect the INSERT INTO..... ON DUPLICATE KEY UPDATE

I am having a challenge with MySQL. As you know MySQL does not consider NULL as a duplicate value in the unique indexes. The problem here is that I have a table but I need to enforces that no similar ...
Jaylen's user avatar
  • 40k
3 votes
1 answer
4k views

FMDB: error 14, unable to open database file

Currently I am using the FMDB wrapper for my iPhone app. My problem is that after executing 2000 SQL insert statements (out of 5000 to 8000 sql statements), I get the following error: "error 14, ...
Nikh1414's user avatar
  • 1,256
2 votes
1 answer
53 views

R6 array member, copy on update

the following code require(R6) Array <- R6Class( "Array", public=list( x=matrix(0,0,0), initialize=function(a,b,c){ self$x <- matrix(a,b,c) }, assign=function(...
user1407220's user avatar
2 votes
0 answers
392 views

Golang-Mongodb Insert element of array inside another array maintaining uniqueness of array

Currently I am learning learn to create restful api with golang and mongodb. I am using mongo-go-driver. I got stuck at this. Let's say I have a collection that has document entries with the structure ...
Vishal Kumar Mahto's user avatar
2 votes
0 answers
231 views

Update (increment) array's object field or create (if not exists) whole document - MongoDb

I'd like to increment some field in nested array or if document not exists, or object in array - create them. Example of existing filled document: { _id: "some_id_1", my_objects: [ { ...
MMC's user avatar
  • 109
2 votes
0 answers
37 views

How can I set only one click in my floting button

I am creating a app and my app is based on expense manager. I have created a floating action button for inserting data and in that I have added two options Inseting income Inseting expense but when ...
Pearl Monis's user avatar
2 votes
3 answers
3k views

How can I accessed upsertedId when using updateOne in MongoDB

I have new data that I want to insert in my array of blog (My collection look like this - shown below):- { _id: 0, // other vars here..., blog: [ { _id: 0, ...
lala's user avatar
  • 1,409
2 votes
0 answers
101 views

import data from source db to target db using flask sqlalchemy

I want to fetch data from one source database and insert it into my targeted database using flask SQL alchemy Database_connection app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:root@...
Jayadeepu Dadi's user avatar
2 votes
0 answers
5k views

Which approach is better for UPSERT in PostgreSQL?

After reading at How to UPSERT (MERGE, INSERT ... ON DUPLICATE UPDATE) in PostgreSQL? I'm curious which approach is better (and faster) for UPSERT. I am currently writing an application where in most ...
Tim Sazon's user avatar
2 votes
1 answer
329 views

Update Else Insert - Informatica

I have two tables identical tables with data from different sources. These tables must now be merged. Both these tables do not have any primary keys I need to merge on table 2 T2 with data in table 1 ...
Jag V's user avatar
  • 21
2 votes
0 answers
1k views

mongo: update $push failed with "Resulting document after update is larger than 16777216"

I want to extend an large array using the update(.. $push ..) operation. Here are the details: I have a large collection 'A' with many fields. Amongst the fields, I want to extract the values of the ...
Christian Arnault's user avatar

15 30 50 per page
1
2 3 4 5
28