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
2
votes
1
answer
424
views
Insert data from Table A to Table B, then Update Table A with Table B ID
I currently have two tables like the following:
Table A
TableAId
TableAPrivateField
CommonField1
CommonField2
CommonField..
TableBGeneratedId
1
datadatadata
datadatadata2
datadatadata3
d...
NULL
2
...
1
vote
1
answer
425
views
Upsert records in postgresql
I am working with postgresql database and I have below update query which works fine -
'UPDATE "main"."item_vendor"\n' +
' SET\n' +
' "vendor_id" = $1,...
0
votes
0
answers
90
views
Not getting value in input field on clicking button in jquery
Simple problem. I have id and a variable I want to concatenate. However when I click on edit button it shows id in input field but not showing correspondant department name in department input field. ...
0
votes
1
answer
429
views
How to update instead of aggregating Google Slides when updating records in Google Sheet with Google Apps Script?
Using Google Apps Script, I generate G-Slides based on a template (first slide top left) as shown below...
...from a Google Sheet where each row has a set of attributes corresponding to its ...
1
vote
1
answer
181
views
Open Edge Progress database update query
I'm a beginner in Open Edge Progress database.
Is there any query to update/insert data into progress database table
my try was
ASSIGN
TABLE.COLUMN=DATA
END
Is this correct?
0
votes
0
answers
30
views
How update the value in SubForm if is duplicate in access
In access I have Form name FB (table name = FB) and SubForm name FBB ( table =FBB) (relationship one to many)
I use
( currentdb.execute "insert into FBB (FBID, ProductName, Quantity) "& ...
0
votes
0
answers
143
views
insertIgnore of Exposed is not inserting data
I have made this table:
object PartnerOwnerMappingTable : IntIdTable("partner_owner_mapping") {
val ownerId = integer("owner_id")
val driverUUID = uuid("driver_uuid")
...
0
votes
1
answer
704
views
Copy first row values to all rows and update two columns value from another table
We have a table where the first row will be updated with UI input through API, we have to replicate the same data for different dates from another table.
How do we do it in SQL (working on SQL Server ...
0
votes
1
answer
362
views
How to change name of a field in MongoDB with java for each document in the collection?
Due to some decisions I will have to change the name of some fields in all documents in a single collection. For purpose of automation testing I am inserting documents and then checking some logics.
...
0
votes
0
answers
61
views
MYSQL SELECT statement failing within an UPDATE, within a LOOP
I am writing a stored procedure to update a company calendar. The calendar data is stored within a MYSQL table. The stored procedure is an insert function which should force all calendar events ...
0
votes
1
answer
1k
views
How to upsert record from one db connection to another in postgres using dbeaver?
I have two connections in my dbeaver namely preproduction and postproduction. Both the database have a table called profiles.
I want to upsert data from my postproduction.profiles into preproduction....
0
votes
1
answer
48
views
Update a single row in a table in SQL
So, I am creating a new table that gets populated from another table. NewTableA.ColA is getting populated from an existing OldTableB.ColB
Source query that populates NewTableA.ColA:
SELECT TOP (1) ...
2
votes
3
answers
157
views
Clojure: Create or update Map values in a vector
I want to update some values in my vector.
To change this :
[{:key 0, :values {:value1 1, :value2 100}} {:key 1, :values {:value1 5, :value2 300}}]
In this:
[{:key 0, :values {:value1 1, :value2 100}}...
1
vote
1
answer
230
views
golang/pq : "pq: function uniq(integer[]) does not exist"
Here's my code (works fine with gin)
query :=`
UPDATE posts SET liked_by = uniq(array_append(liked_by, $1))
WHERE id = $2
RETURNING liked_by`
return p.DB.Exec(query, userID, post.ID)
The error I'm ...
0
votes
0
answers
803
views
How to do an UPSERT in Python for MSSQL [duplicate]
I have the following problem. I am getting some data from an api in form of a json.
I want to load this json data into an existing table.
I get the data in following format:
{
"abcd": &...