Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
39 views

I have a persistent navbar component for navbar. Getting duplicate key error when logout and login. if we switch tab error is gone ════════ Exception caught by widgets library ═════════════════════════...
Vinaya Augusthy's user avatar
1 vote
0 answers
50 views

I am using formkey in my screen and I am not reusing it anywhere . But getting following error on navigation. I am defining my formkey inside my viewmodel. Putting this inside view resolves problem. ...
Vinaya Augusthy's user avatar
0 votes
0 answers
93 views

I have to update a existing record e.g. INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3) ON DUPLICATE KEY UPDATE column1 = VALUES(column1), column2 = VALUES(...
orochi's user avatar
  • 1,258
0 votes
0 answers
91 views

I'm building a Discord bot dashboard API using NestJS, Passport, and TypeORM for session management. When a user attempts to log in through Discord, I encounter two errors: [Nest] 19524 - 09.08.2024 ...
Meenic's user avatar
  • 3
0 votes
1 answer
554 views

I'm storing players of my game based on their level : CREATE TABLE IF NOT EXISTS Player( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(255) NOT NULL UNIQUE, level TINYINT UNSIGNED ...
user25485418's user avatar
0 votes
0 answers
37 views

I'm using Mysql query like this: INSERT INTO test (id, name, customerId, timestamp, status, lastTimestamp, testId, testCapacity) values(1, 'test1', 2, 1717415401000, 'SAFE', 1717415401000, '...
Vijay Rajpurohit's user avatar
0 votes
1 answer
57 views

I have a stored procedure with which I try to insert some data into two tables but I don't want to insert duplicate keys. So I wrote the following procedure with the handling of error 1062: duplicate ...
Marisa's user avatar
  • 1
0 votes
1 answer
68 views

Using HeidiSQL, I update a table with multiple duplicates using this query: INSERT INTO ach_progress (user_id, app_id, ach_name, unlock_time) VALUES (123456, 123456, '3', '2024-04-23 13:59:31'), ...
Hadrien Debris's user avatar
0 votes
1 answer
67 views

I have two sheets, each containing a table with duplicate keys. I want to create a third sheet that merges these two tables such that each row represents a cross-product of the data for each key. Here'...
Guillermo Prieto's user avatar
0 votes
2 answers
65 views

I need to do bulk insert and update on MySQL so I used the ON DUPLICATE KEY UPDATE. I need to ignore the updated by and updated date fields as existing old data if there are no changes in those record'...
Mohanraj Periyannan's user avatar
-1 votes
3 answers
72 views

I am using on duplicate key to update data in a mySQL DB v 8.0.35 (AWS RDS instance) I want to update a selection of fields with the new value. Plus set a further field (up[dated) to 1 only if a ...
Ian Bale's user avatar
0 votes
1 answer
73 views

How does one get a list of the record IDs created or updated when an INSERT INTO with ON DUPLICATE KEY is used - within the very stored procedure that executes the INSERT? For example, such an action ...
Floobinator's user avatar
0 votes
1 answer
47 views

Let's say there are 4 columns in my table ID int(11) AI PK BANK_ID int(11) BANK_BRANCH_CODE varchar(255) BANK_BRANCH_NAME varchar(255) I want to UPDATE the BANK_BRANCH_NAME if the combination of ...
chiefpika's user avatar
  • 557
0 votes
0 answers
25 views

I have a table looking something like this id (Primary Key, Auto increment) user_type name some_column 1 Type 1 Name 1 Some value 1 2 Type 2 Name 2 Some value 2 I want to utilise ON DUPLICATE KEY ...
JohnnyBravo442's user avatar
-2 votes
1 answer
63 views

I want to copy and paste table data into that same table by only changing one value Example: BillingLocationID It's not possible to do it one by one inserting there are large number of rows. I've ...
Chrishan Kankanamge's user avatar
5 votes
4 answers
377 views

Could you please suggest is there any way to keep all the repeatable (duplicate) keys by adding prefix or suffix. In the below example, the address key is duplicated 3 times. It may vary (1 to 3 ...
Sri's user avatar
  • 85
0 votes
1 answer
112 views

I am interacting with MongoDB using C# driver. It threw duplicate key error like below for one index the highlighted value 0x141214141a24 is not a actual value in the error message of location.path. ...
Abhishek's user avatar
  • 125
0 votes
0 answers
194 views

I'm trying to run an update query on this table to change any reference of 'YYY' to 'XXX' for COL1 while ignoring any rows that have already been updated this way. COL1 AND COL2 are primary keys. Is ...
Riochi's user avatar
  • 1
-2 votes
1 answer
50 views

hi everyone i need help create table wishlist ( userID int null, wishlistData longtext collate utf8mb4_bin not null, constraint userID unique (userID)...
Rami Nasfi's user avatar
0 votes
2 answers
240 views

I am writing event-log data to a MariaDB database. The primary key includes the time to one-second granularity. I sometimes get bursts of identical input data. This violates the key and is ...
Fish's user avatar
  • 3
0 votes
1 answer
972 views

I have a table2 which has a composite primary key built from two columns, one of which is a foreign key from another table called table1, and the other is called position. The table has a third column ...
Zhivko's user avatar
  • 1
0 votes
0 answers
24 views

I searched a lot in the docs, but can't find an example or explanation upon the (detailed!) usage of Query::InsertPolicy in conjunction to the mass insertion function "insertfrom()". It just ...
Synopsis's user avatar
  • 374
0 votes
1 answer
118 views

I have a working solution, but I'm not sure this might be the best solution. My goal: there's a table (testtable) with a column status. When the current status is 'CXL' and a insert query is run, the ...
user369122's user avatar
1 vote
2 answers
75 views

In the example code below, col1 and col2 are primary keys in the database! My question is: should they be added in the part of the code after the ON DUPLICATE KEY UPDATE, as it is already in the code, ...
Py Ton's user avatar
  • 53
0 votes
0 answers
125 views

I have 4 rows in my SQL table. id, tokenid, score and time. If a player is playing the game for the first time, I can save it to the database. If a player replays and collects more points than when ...
Serkan Çelik's user avatar
1 vote
1 answer
3k views

I have two models as follows: type OHLCV struct { gorm.Model Interval string `gorm:"uniqueIndex:idx_ohlcv"` Pair string `gorm:"uniqueIndex:...
koutlaas's user avatar
1 vote
1 answer
853 views

VALUES() gives a deprecation notice in mysql 8.0 when used in a query like this INSERT INTO foo (bar, baz) VALUES (1,2) ON DUPLICATE KEY UPDATE baz=VALUES(baz) This post showed how to fix it if you ...
Hasley's user avatar
  • 99
0 votes
1 answer
754 views

I have a JSON file like { "object1": { "key_1": "value_1", "key_2": "value_2", "key_3": "value_3" }...
Partha Debnath's user avatar
2 votes
1 answer
332 views

I have a dataframe in Pandas with duplicate values in Col1: Col1 a a b a a b What I want to do is to split this df into different df-s with unique Col1 values in each. DF1: Col1 a b DF2: Col1 a b DF3: ...
Smbat's user avatar
  • 71
0 votes
1 answer
2k views

We are having a mysql table like below CREATE TABLE student_subject ( student_subject_id int(11) NOT NULL AUTO_INCREMENT, student_id int(11) NOT NULL, subject_id int(11) NOT NULL, version int(...
Syedsulaiman M's user avatar
0 votes
0 answers
114 views

I have table with partitions by timestamp column (milliseconds). Theoretically it is unlikely to coincide, but can make the case that 2 inserts try to made with the same timestamp. Obviously it would ...
SamYan's user avatar
  • 1,591
0 votes
2 answers
571 views

Let's say I have these two tables. Where I insert employees to employee table coming from the staging table. staging table: id employee_id name 1 12 Paul 2 13 Kyle employee table id employee_id name 5 ...
quielfala's user avatar
  • 629
0 votes
0 answers
18 views

I insert my data using INSERT INTO SELECT then I have ON DUPLICATE KEY UPDATE like this: ON DUPLICATE KEY UPDATE first_name = COALESCE(eb.first_name, employee.first_name), middle_name = ...
quielfala's user avatar
  • 629
1 vote
1 answer
1k views

I struggle to understand prepared statements in PHP to allow users to edit a MySQL-database. The user input is UTF-8, typical examples are the name in Arabic, Chinese, ... It also generates a problem ...
Juergen's user avatar
  • 31
-1 votes
2 answers
721 views

my table looks something like this id effect1(int) effect2(int) effect3(int) 1 0 1 5 2 1 0 0 i have a function, which return 1to3 int value ...
mohammad eunus's user avatar
0 votes
1 answer
55 views

I'm learning SQL by using online code editors that can run the code, e.g. techonthenet.com or w3schools. The problem is, ON DUPLICATE KEY UPDATE command doesn't seem to work in those editors. Here's a ...
Marcin Pagórek's user avatar
2 votes
1 answer
2k views

How can I use insert statement with on duplicate key update like MySQL in Snowflake? MySQL code : INSERT INTO table (column_list) VALUES (value_list) ON DUPLICATE KEY UPDATE c1 = v1, c2 = v2, ...
Mukul Kumar's user avatar
4 votes
1 answer
5k views

I am still wondering if there is something like a conditional on duplicate update in MySQL 5.7 I have a table which is updated by different sources. Let’s assume I have a table CREATE TABLE t ( ...
Thallius's user avatar
  • 2,613
0 votes
0 answers
79 views

We have a large table (around 100 million rows) that is often written to, and often updated rapidly (think an app that auto-saves state every x seconds). All writes to this table currently do INSERT .....
quakes's user avatar
  • 461
2 votes
1 answer
914 views

I have a master detail relation between two tables. Troq is the master table and Troq_Alma is the detail table. Troq_Alma primary key is formed by Troq primary key (Troq.cod) and "Num_Orden&...
Atreide's user avatar
  • 267
0 votes
1 answer
745 views

I'm using NodeJS with MySQL and async/await statements. I've got a UNIQUE column in a MySQL table named audioid. I need to check if an audioid exists. If so I need to update a row. If not I need to ...
Meggy's user avatar
  • 1,721
0 votes
1 answer
164 views

I'm adopting dashboard now and I created two tables for selecting from frontend; DATA_SELECTED_HISTORY DATA_SELECTED_NOW My frontend page get data from DATA_SELECTED_NOW and my backend algorithm put ...
안유빈's user avatar
0 votes
2 answers
79 views

I am trying to use a WHERE condition on an INSERT INTO statement that contains ON DUPLICATE KEY. An example of what I'm trying to achieve is below. This SQL statement is being called by third-party ...
Dan's user avatar
  • 2,354
3 votes
1 answer
3k views

I want to insert multiple items into a table and upsert the table on conflict. This is what I came up with the following from sqlalchemy.dialects.postgresql import insert meta = MetaData() jobs_table =...
Bazinga777's user avatar
  • 5,311
0 votes
0 answers
127 views

I am implementing a situation when the INSERT ...ON DUPLICATE KEY UPDATE needs to be executed only after an IF condition is satisfied. I am having issues on how to include the condition statement. ...
Pushkar's user avatar
  • 160
0 votes
0 answers
53 views

I'm using node.js with MySQL and i have two table like Bookings and Places to make a parking API I'm trying to book a place on Table Bookings and update field Places.isAvailable (type Boolean) in a ...
Lolo Yourownway's user avatar
0 votes
0 answers
194 views

I have this table: CREATE TABLE `test` (`id` INT(11) NOT NULL AUTO_INCREMENT , `name` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB; | id | name | | -- | ---- | In which I insert the ...
Oscar VA's user avatar
0 votes
1 answer
126 views

I have a somewhat long MySQL ETL statement where I am inserting 32 columns of data into a table. This ETL statement is also utilizing UNION as a derived table. My code is similar to this, as defined ...
Mick's user avatar
  • 1
0 votes
1 answer
58 views

I am trying to get unique objects within an array of objects. Let's say the object is like below. values = [ { id: 10, available: true }, { id: 10, available: false }, { id: 11, ...
Dipanjan Panja's user avatar
0 votes
1 answer
252 views

I have created the following table: CREATE TABLE IF NOT EXISTS `prices_1d` ( `symbol` char(50) NOT NULL, `open_time` datetime DEFAULT NULL, `open` decimal(15,8) unsigned DEFAULT NULL, `high` ...
JejeBelfort's user avatar
  • 1,693

1
2 3 4 5
7