Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
7 replies
43 views

Due to a BUG, an application that persists data in an Oracle 19c database is updating a incorrect value in a specific row of a table. This incorrect value prevents users from accessing that table ...
Danilof's user avatar
-2 votes
1 answer
166 views

In this example I wanted to replace every NULL value in the Quantity column with the mean of the column. I'm using CASE here to achieve that but what ends up happening is instead of replacing NULL ...
Carl Mark Sibal's user avatar
5 votes
4 answers
226 views

I have the following table definitions: Table public.messages: Column Type Collation Nullable Default ip text msg text ignore boolean Table public.host: Column Type Collation Nullable Default ip text ...
Andreas Weigl's user avatar
-4 votes
1 answer
100 views

I have this insert query for my MariaDB 10.6.19 database: CREATE TABLE manufacturers ( manufacturers_id int(11) NOT NULL AUTO_INCREMENT key, manufacturers_name varchar(32) unique NOT NULL, ...
Giancarlo's user avatar
  • 433
2 votes
2 answers
125 views

Consider the following code to update "/project/cost/final" in an untyped XML. The code will run successfully, however, the value actually remains unchanged. DECLARE @xml XML; SET @xml = ' &...
Miles Fan's user avatar
2 votes
2 answers
139 views

UPDATE `details_audit` a SET a.count_changes_below_100 = ( SELECT COUNT(*) FROM `details_audit` WHERE sort_id < 100 ); This worked on a previous version of ...
Brian Douglas's user avatar
5 votes
2 answers
131 views

I have a MySQL database of some 5000 products imported from Excel a while ago. Unfortunately, Excel truncates values with trailing zeroes so they were imported into the Price column in a mix of values ...
Stef Dawson's user avatar
-1 votes
1 answer
167 views

I'm trying to update table1.logged_off (a LONGDATE column) using data from a local temporary table with matching IDs. Here's what I have so far: Here's what I'm doing: Step 1: Create and fill the ...
bagere's user avatar
  • 284
2 votes
2 answers
90 views

Here's an idea of what the temporary table contains: ID FullRank Special 1 1 No 1 2 Yes 1 3 No 2 1 Yes 2 2 No 3 1 No 3 2 Yes 3 3 Yes 3 4 No 3 5 No And this is what I'm trying to achieve... ID FullRank ...
TheSteersman's user avatar
-1 votes
2 answers
177 views

We have a database utility in our product suite that handles both the creation of new databases and the upgrade of existing ones. For new tenants or customers, the creation flow is executed. For ...
Chirag Vidani's user avatar
0 votes
2 answers
97 views

I have this table: id, heartbeat_at, data_json, ... The column heartbeat_at is frequently updated with this query: UPDATE table SET heartbeat_at = NOW() WHERE id IN (...) The data_json column is much ...
Chris's user avatar
  • 14.4k
0 votes
1 answer
94 views

I have two table in a Postgres database: Table users_ill contains users that are ill. Table admin_employees is for admins that have users by the department_id so that an admin can only see users ...
oemer ok's user avatar
  • 291
1 vote
2 answers
98 views

I've got a SQL query that is trying to update threshold information on a SolarWinds database. The main data is within the Nodes view and the Thresholds table contains the warning and critical ...
DigiCoinzTrader's user avatar
1 vote
0 answers
77 views

Basically, I have a MariaDB database (hosted through XAMPP). Some of the tables in the database are based on Excel files kept various places in my organization's main drive. IDEALLY: if any of those ...
Boom's user avatar
  • 514
-1 votes
1 answer
53 views

I have a table that looks like this: id|week|start_date 1,4, 0026-10-23T00:00:00.000+00:00 2,5, 0026-09-22T00:00:00.000+00:00 3,6, 0026-09-25T00:00:00.000+00:00 I am trying to write a SQL statement ...
Coder123's user avatar
  • 352
4 votes
5 answers
156 views

I have a Postgres Timescaledb table (mysolar) in which I collect energyvalues (time,energy) from my solarpanels. Sometimes, for whatever reason, I get a ‘zero-value’ reading. (see example table). I ...
Leo's user avatar
  • 61
2 votes
1 answer
114 views

I tried to update my tables collation from utf8mb4_general_ci to utf8mb4_unicode_ci, which is pretty simple specially using pmpMyAdmin. But after several attempts to update values it seems that ...
user2653774's user avatar
1 vote
0 answers
45 views

I am trying to update certain data in a table that I would typically update using an update statement but the problem is that the data will come from an Excel spreadsheet. I know I can create a table ...
Gianpiero Loli's user avatar
2 votes
2 answers
100 views

I want to update a table in a WITH query (not a requirement, if it's achievable another way that's fine too) and count rows of the updated table (including the updated row) for the subsequent query. ...
Marcus Ruddick's user avatar
1 vote
0 answers
45 views

I want to create trigger in Oracle 12c DB which will do insert in table_2 when update of record in table_1. Both table_1 and table_2 are same structure. When user set value of email_sent to 'Y' then ...
Ina's user avatar
  • 11
-1 votes
1 answer
87 views

In t-SQL, I have added a new column named "AGE" to table "employees", but I have to write different update statements for insert each age value, since each employee has a different ...
Shivam Maurya 1729's user avatar
0 votes
3 answers
104 views

The thing is about a very simple update statement: UPDATE `user` SET fans = fans +1 where id = 8; (because it will not cause any concurrency issue when just single[auto commit] use it, so I want to ...
Billy's user avatar
  • 81
0 votes
1 answer
84 views

The end result I am looking for is to have a query that will find specific records in Table1, use a field in joined Table2 to retrieve a day of the week, use a formula to determine the next occurring ...
Mark Simmonds's user avatar
3 votes
1 answer
91 views

I encountered an unexpected behavior in MariaDB when performing an UPDATE statement with multiple SET clauses. Here's the setup: Table Creation and Initial Data CREATE OR REPLACE TABLE products ( ...
Ozzy Black's user avatar
0 votes
1 answer
45 views

I am attempting to do a column update in SQLite where if a certain string exists, update the column EXCEPT if it matches a particular string. Note, I can't use an EXCEPT statement in the select query ...
tpcolson's user avatar
  • 681
0 votes
0 answers
644 views

In spring boot with Java I have an Entity class that contains a list of elements. I want to create an endpoint (POST? or PATCH?) from which I can add a new element to those present: import java.time....
Gianni Spear's user avatar
  • 8,058
1 vote
1 answer
39 views

I'm trying to update an int4 field on supabase, but nothing happens when the code runs. The updates in the when block for OnCallDates, GymCallDates and LeaveDates work perfectly, even in the else ...
Oladayo Babalola's user avatar
1 vote
1 answer
43 views

I created trigger which should insert record into T_TABLE_B after T_TABLE_A changed(update) one column. But after updating T_TABLE_A, got error ORA-04091: table T_TABLE_A is mutating, trigger/function ...
Ina27's user avatar
  • 11
0 votes
3 answers
271 views

Can anyone please help me with this scenario where I have might have multiple OBJECT_CONSTRUCT nested within an ARRAY_CONSTRUCT. I am not able to update one value of an element within it. I am using ...
tan1987's user avatar
1 vote
1 answer
116 views

Question: I have a query that lists the following columns: repid, Car, Model, Fault, and cnt (a count of occurrences). The current output of my query looks something like this: Query: SELECT repid, ...
asmgx's user avatar
  • 8,170
0 votes
1 answer
57 views

I am having an issue trying to use an update query: select lc.name as locations, lc.sequence from dbo.LocationContainers lc Currently this query shows this result: locations ...
icodesomething's user avatar
1 vote
0 answers
52 views

Using EclipseLink 2.6.4 with JTA and the property eclipselink.persistence-context.flush-mode=commit. The UPDATE in the database is not done when I'm trying to commit a transaction where several merges ...
EmilienLF's user avatar
0 votes
0 answers
62 views

I have this very strange behavior using pglite (PostgreSQL version 16) in Firefox, where I run an UPDATE JOIN, and then a SELECT which the first time around doesn't reflect the change made by the ...
Ludovic Aubert's user avatar
-1 votes
1 answer
72 views

I want to update a column in SQL Server by keeping its original value and appending new value separated by comma. It can be done like this: string sql = "UPDATE Table SET Column = Column + ', ...
Frank Martin's user avatar
  • 3,477
0 votes
1 answer
128 views

I have let's say 20 tables, which have chain_id column with values. We have decided to change all chain_id values to new ones (it's not PK/FK). I have a mapping table with chain_id and new_chain_id. ...
sickless's user avatar
0 votes
1 answer
81 views

I have a recursive procedure in a package in Oracle that traverses through a network. The recursive function runs down the network from the top and then returns values back up as the recursions close. ...
David Klein Ovink's user avatar
0 votes
2 answers
416 views

Simplified scenario: I want to update one table A (10 million rows) with a value from another table B (20 mil rows). The two tables are linked with ids. It took more than 7hrs to update the whole ...
UpLevel's user avatar
  • 13
-2 votes
1 answer
56 views

I have a MySQL 5.7 table. There are 9000 records that I need to set consecutive dates to. The first 300 records will have 2025-01-02. The next 300 records will have 2025-01-03. And so on until all ...
John Beasley's user avatar
  • 3,099
0 votes
0 answers
47 views

I'm trying to update 5 columns on a table using the results of another query. The SQL is below. T used the other query to selet the RO numbers I need with out any issue. I'm trying to join the ...
Shaves's user avatar
  • 940
3 votes
3 answers
96 views

I am using the following SQL query to update a temp table to be able to determine priority. This is my SQL statement UPDATE #CARD SET rank_no = x.no_rank FROM (SELECT rank_no, ...
Cindy Fuentes's user avatar
0 votes
2 answers
128 views

I am having problems with updating records in MS Access through Excel macro (coded in VBA). I'll try to explain better what's the issue: I created a UserForm to input the information inserted in ...
busynessman's user avatar
0 votes
0 answers
55 views

I'm trying to perform an INSERT operation with an ON CONFLICT DO UPDATE clause in PostgreSQL. My table contains column names with aliases (e.g., "ITEM_CODE(material_code)"), and I want to ...
Ravi Choudhary's user avatar
1 vote
1 answer
76 views

In Snowflake, I would like to update a flag in the current table if there is values matching in 4 columns in another table. Only one columns has to match to set it to True. data looks like below in ...
em456's user avatar
  • 441
0 votes
1 answer
274 views

I have a problem with an Oracle Connector. It should work as follows: 1 - Delete rows where the start date is equal to SYSDATE 2 - Insert data in that table 3 - Update rows with start date different ...
ennezetaqu's user avatar
2 votes
2 answers
94 views

I have a column filled with values that need updating because they are too ambiguous and I want to update these values with values from another table columns. Player Table: ID Email FirstName 1 Bob....
Andrew C's user avatar
  • 117
1 vote
1 answer
63 views

I created the question in "Rich Text Mode", so might need to view in that to get the proper layout for the tables. I have two tables. Table1 UserID TicketNumber CaseID Status 1 INC1234567 ...
A M C's user avatar
  • 35
1 vote
0 answers
36 views

I use eloquent for delete in my project with laravel8.it returns true but the records not remove from table. what I try to do: Package::findOrFail($id)->delete(); I have this problem on eloquent ...
رضا رهنما's user avatar
0 votes
1 answer
52 views

I have to update a table with SET columname as variable selecting from another table. This is my MySQL : UPDATE famcharts_old.db1w_matrix JOIN famcharts_old.tbl_dirtosv ON famcharts_old....
Luc Snoekx's user avatar
0 votes
1 answer
80 views

I've made extensive use of bulk insert for onboarding and similar tasks. Unless I'm mistaken, one of the main reasons this runs rapidly is that much of the work is done locally on the server as ...
Maury Markowitz's user avatar
-1 votes
1 answer
125 views

sql = "Update tblUserAccount set username = '" & txtUsername.Text & "', password = '" & txtPassword.Text & "', AccessLevel = '" & cmbAccessLevel.Text &...
Fritz Baider's user avatar

1
2 3 4 5
246