sql-update Questions
4
Solved
I'm using Django and Python 3.7. I have this code
article = get_article(id)
...
article.label = label
article.save(update_fields=["label"])
Sometimes I get the following error on my "save" line ...
Total asked 22/5, 2019 at 14:22
3
Solved
I have couple thousands records and I need to update them in batches of 350 records.
I would like to know if there is any difference in the below two update statements and if one of them would wor...
Pure asked 1/2, 2017 at 10:43
7
Solved
Need to "tie" UPDATE with ORDER BY. I'm trying to use cursors, but get the error:
cursor "cursupd" doesn't specify a line,
SQL state: 24000
Code:
BEGIN;
DECLARE cursUpd CURS...
Blooded asked 24/5, 2013 at 13:19
13
Solved
When I want to execute an update query on my table I got an error saying:
1036 - Table data is read only.
How can I fix that?
Table attributes in /var/db/mysql are set to 777.
'Repair Table'...
Kokanee asked 5/3, 2012 at 23:50
7
Solved
Is there a way we can undo a SQL update query?
Cynara asked 1/2, 2010 at 16:56
6
My database driver for PostgreSQL 8/9 does not return a count of records affected when executing INSERT or UPDATE.
PostgreSQL offers the non-standard syntax "RETURNING" which seems like a good wo...
Polygyny asked 27/10, 2010 at 23:45
5
I am trying to update a selected values in a column in a SQLite table. I only want update of the cells in the maintable where the criteria are met, and the cells must be updated to individual value...
Kreutzer asked 6/6, 2012 at 19:51
4
An update SQL query was executed on the server, which caused many problems later.
How can I get the list of update queries executed in last 2 months, so that I can trace the exact problematic SQL ...
Dorcasdorcea asked 12/2, 2013 at 10:55
9
Solved
I am trying to understand how to UPDATE multiple rows with different values and I just don't get it. The solution is everywhere but to me it looks difficult to understand.
For instance, three updat...
Douceur asked 4/9, 2014 at 20:48
4
Solved
I have two tables.
Table1 contains companies whose locations are georeferenced with lat/lng coordinates in a column called the_geom
Table2 also contain the same companies from Table1, not geore...
Ferguson asked 13/10, 2012 at 3:6
5
Solved
I have the following string in an Oracle 9i database:
A,B,C,
I need to replace all instances of ',' when it is the last item in the string. I have come up with the following statement but it dele...
Peres asked 18/9, 2013 at 17:17
5
Solved
I am trying to copy the corresponding graduation_date values from the graduation_term table into the rows in the user_education_mba_school table that have the matching graduation_term_id. Here is m...
Stanton asked 29/6, 2012 at 0:24
6
Solved
How to update mysql data in bulk ?
How to define something like this :
UPDATE `table`
WHERE `column1` = somevalues
SET `column2` = othervalues
with somevalues like :
VALUES
('160009'),
('160...
Pulvinate asked 1/3, 2016 at 15:30
7
Solved
I've made an email script that should update as soon as wp_mail has result. For some reason my value won't update. Have I missed something? I am receiving the mail so the wp_mail works.
Cheers!
$...
Mend asked 3/3, 2013 at 12:0
5
My site was developed using Drupal 6 running on a Postgresql 8.3 server on Ubuntu 11.10. Also webmin version 1.590.
Now I want to update records in a table, but when I run:
UPDATE uac_institution_v...
Intestate asked 31/10, 2012 at 5:6
5
Solved
I am trying to update a text field in a table of my postgresql database.
UPDATE public.table SET long_text = 'First Line' + CHAR(10) + 'Second line.' WHERE id = 19;
My intended result is that th...
Waddle asked 29/10, 2014 at 19:7
40
Solved
In SQL Server, it is possible to insert rows into a table with an INSERT.. SELECT statement:
INSERT INTO Table (col1, col2, col3)
SELECT col1, col2, col3
FROM other_table
WHERE sql = 'cool'
Is i...
Penal asked 25/2, 2010 at 14:36
5
Solved
Someone entered a ton of numeric data into a table with the sign backwards.
Is there a clean way to flip the sign in the numeric column with a SQL statement?
Statesman asked 17/2, 2010 at 3:27
3
Solved
Two tables.
Content (table),
topic_id (primary key),
data (text)
Topics (table),
topic_id (primary key),
content_type (text)
Both tables have the same primary key data (topic_id).
I need t...
Chubby asked 15/4, 2011 at 22:25
2
Solved
I have the following schema
ID (PK)| REF_ID | ACTIVE | STATUS
ID - Primary Key
I am using following query to select and update
BEGIN;
select * from table where ref_id = $1 and is_active i...
Formally asked 27/6, 2018 at 20:20
4
Solved
Can the UPDATE query be used without a WHERE clause? And if so in what conditions?
Perrin asked 28/8, 2012 at 15:52
4
Solved
I'm wondering about the following query :
UPDATE statisticsTable
SET Value = (select count(*)
FROM OtherTable o
WHERE o.UserId = UserId ) <-- this is the part that concerns me
WHERE id i...
Ezana asked 16/8, 2017 at 14:6
3
Solved
I have a very basic UPDATE SQL -
UPDATE HOLD_TABLE Q SET Q.TITLE = 'TEST' WHERE Q.ID = 101;
This query runs fine in Oracle, Derby, MySQL - but it fails in SQL server 2008
with following error: ...
Pettiford asked 12/2, 2011 at 23:57
7
Solved
I'm writing a Django-ORM enchancement that attempts to cache models and postpone model saving until the end of the transaction. It's all almost done, however I came across an unexpected difficulty ...
Spectrochemistry asked 11/8, 2011 at 1:23
19
Solved
I need to update this table in SQL Server with data from its 'parent' table, see below:
Table: sale
id (int)
udid (int)
assid (int)
Table: ud
id (int)
assid (int)
sale.assid contains the cor...
Gracchus asked 18/8, 2009 at 11:40
1 Next >
© 2022 - 2025 — McMap. All rights reserved.