update's questions - English 1answer

674 update questions.

(codeigniter) I Want To insert data in transaction table and at the same time update customer table . I want to Add value of ChangeDue in transation table To value now_debt in Customer Table ...

I'm using SQL Server Management Studio 2005. I want to look up a column value in another table, using a shared ID tblOrder_ordernr in both tables, but only update one table. To me, the query is ...

For testing purposes I periodically restore production backup into a new database (AWS RDS PostgreSQL instance) with pg_restore. In the new database I run SQL queries that anonymize sensitive data. ...

I have to update many records. I don't want to duplicate the entries. The table concatenates the value to the end. So in theory, I could add the value twice. I want to put a check to make sure the ...

I have a users table with autoincrement id as primary key, and unique key on email. The email and name fields are from facebook. +----+-------+------+ | id | email | name | +----+-------+------+ And ...

I am working on complicated problem, but I will simplify it to this problem. I have two tables A [ID, column1, column2, column3] B [ID, column1, column2, column3, column4] and I want to update the ...

In MariaDB 10.3.9: SELECT COUNT(*) FROM photos vs UPDATE counts SET countValue = (SELECT COUNT(*) FROM photos) WHERE countName = 'photos'; The select takes 1.1s vs the update which takes 2.6s. ...

Can't seem to figure out how to update a single field. Whatever I try, to update one field (picture: "url") the rest of the fields are being removed and set to null. I use the following command now: ...

I am working on scrambling PII tags in CLOB columns such as <FirstName> or <LastName> or <SSN_Number>. so I am using the below query to achieve the same. UPDATE /*+PARALLEL(8)*/ ...

Situation: there is a table "Tours" which contains a lot of generated records with different properties (Color, Priority, PickedUp). The goal is to allow external application (over REST API) to pick ...

I am attempting to remove an element from my database. The element I want to remove is within a JSON object called playerContainer which contains an array named players. This all sits within a table ...

I want to create a trigger that set a column to to_sync true if the other columns has been changed. CREATE TRIGGER [dbo].[product_trig] ON dbo.product AFTER UPDATE SET NOCOUNT ON; IF NOT ...

I have a table in the name of ips as below: CREATE TABLE `ips` ( `id` int(10) unsigned NOT NULL DEFAULT '0', `begin_ip_num` int(11) unsigned DEFAULT NULL, `end_ip_num` int(11) unsigned DEFAULT ...

I have a table with following definition: create table json_test ( filter_data jsonb); and i insert to it values like this: '{"task_packets": [ { "state": "PROCEEDING", "...

Say I have a table with columns C and D (among others but these are the relevant ones) with the date type. I am instructed to update the values in C to be 90 days before its corresponding value in D, ...

I have database_1 and database_2 both on the same server. How can I instantly update the USER table in database_2 when data is inserted into the USER table in database_1? Structure of both tables: ...

I'm writing a trigger for a SQL Server database. What I want is, when a table is updated, check if a specific column is updated or not and if another column has a value = 'W' or not. If it is so, the ...

This is my table structure: Column | Type | Collation | Nullable | Default | Storage | Stats target | Description -------------+---------------...

This is probably simple but it's been puzzling me for hours. Task to run a count of _pageviews for _remote_addr (ip address). Each day the table will be truncated to start the counts again. CREATE ...

I have a table like this: CREATE TABLE `mytable` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `column1` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `column2` varchar(255) COLLATE ...

I've been trying to figure this out for hours and can't seem to get it. If it can be done, any help would be greatly appreciated! I hope I'm clear with what I'm asking :-) Consider the following: ...

I have a large table (58+ million records) which represents a relation between two records (player and target) in a second table. Unfortunately, whoever designed our schema didn't think things ...

I recently came across this strange behaviour in Postgres. I had a table like the following one: sasdb=# \d emp_manager_rel Table "db3004db.emp_manager_rel" Column | Type | ...

I need to update values I get when I run this select statement select * from POSTPAID_RERATE_NEW_1 a left join CUg_IND b on a.service_class = b.service_class where CALLINGGROUPNO = CALLEDGROUPNO ...

I have Update transaction that will run for single row at the time. However, my application is multi thread and there might be more than one user at the time trying to access same table. While doing ...

EDIT: Here are two database Files that demonstrate an applied example of the problem: Example_DBs.zip (Zipped due to 2 link limitation.) Note: The missing Field in "Not Working.mdb" is intentional....

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, two updates ...

I'm using SQL Server 2014, with a linked server to a MySQL database on AWS. I need to update rows on that linked server, using data that exists on another linked server. And if that wasn't complicated ...

Within a single query, all current time functions like sysutcdatetime() return a single point in time that is re-used throughout the query for each instance (e.g. of sysutcdatetime()) no matter how ...

In MySQL, I can do a query like this UPDATE prd_sectionshapename se inner join prd_shape s ON s.id = se.shape_id SET se.company_shape_name = 'ABC', s.name_en = 'Another name' ...

I am trying to update selected data from a table column and format this data as currency. My table column holds strings that have both mixed whole numbers and already formatted data. This was due to ...

Is there a way to get the affected row count, when updating through an connection server? I'm using MSSQL connected to MySQL with ODBC. UPDATE OPENQUERY (MyConnection, 'UPDATE recordid, status FROM ...

I have 2 columns, an int and a tiny int, and I want to update another column, a varchar one, with the value column1 + '-' + column2. Something like this pseudo code: UPDATE COLUMN3 varchar = CONCAT (...

Here are two SQL statements. One is an select statement and the other is a update statement. I want to combine them. Select SELECT * FROM test WHERE `id`='1' Update UPDATE test SET `select_count`=...

I'm creating a trigger in mysql, but even with the correct syntax and the query being accepted the trigger is not created. If anyone can help. The following is the sql: DELIMITER $ CREATE TRIGGER ...

I have two tables in my database like these: CREATE TABLE `main` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` int(11) NOT NULL, `status` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB ...

PostgreSQL has two distributions for Windows, EnterpriseDB BigSQL Do either of these Windows distributions support automatic updates for the term of support? Something that looks for the updates ...

With stored procedures in PostgreSQL v10.1.2, which is the fastest way or which is better: to check if rows exists and then update or try to update directly with the possibility that no rows matching ...

I'm barely new with Solaris OS and there are still a couple of things I definitely don't get it. I want to replicate a MySQL installation that someone did in the past in a development server we have. ...

It's required to update columns with metadata globally in all rows of all tables in DB. Let's say every table has a column MY_META and the aim is roughly update ANOTHER_TABLE set MY_META = 'HELLO' ...

I'm trying to replace a column with a lookup from another table. Seems simple, but I'm thinking PostgreSQL is getting in the way for some reason. I've seen that some syntax that evidently doesn't ...

This is related to my previous question: Trigger to cascade updates to a second table. In my Postgres 9.6 DB, I had 2 triggers on emprise (formerly table1), supposed to insert or update some fields ...

In my PostgreSQL 9.6 database, I am trying to update 2 fields in table2 with a trigger when table1 is modified. Function: CREATE OR REPLACE FUNCTION schema.maj_tbl2() RETURNS trigger AS $BODY$ ...

I am trying to write a Stored Procedure which updates a quantity data column in one of my tables, and then takes a field set for random notes and concatenates the update information. This is what I ...

I have a simple MySQL table with 3 columns id, balance and locked. I have a requirement where the locked column's value must be increased by x, sometimes by multiple processes running at the same time,...

We have an issue similar to this. Only, the solution there won't work for us as: We don't use multi-table JOINS, but UPDATE … WHERE `userid` IN (<list of 10k ids>); We currently "only" have the ...

My table employees contain more than ten million data. i want to update 10k rows in commission_pct column where commission_pct is null and set zero(0) value. in oracle I can easily solve this by ...

This is a continuation of Updating a table with duplicate id's while avoiding " single-row subquery returns more than one row" , however i felt the question was too different to follow ...

I'm currently making SQL that'll update data from 1 table, based on data from another table for my company update table1 set column1 = (SELECT color FROM table2 Where ...

I want to link two columns under new column in the same table. For example: in my database there is an ID of the employee and there is another ID for his manager in the same table. Also, in the same ...

Related tags

Hot questions

Language

Popular Tags