Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
121 views

I am working with an Oracle database in which each year's data is stored in different tables. I am not the DBA so I cannot change that. Also, I do not have the permission to consult execution plans or ...
Thomas's user avatar
  • 553
0 votes
1 answer
117 views

The goal is to simulate SQL INSERT BY NAME behavior in Snowflake Using the BY NAME modifier, the names of the column list of the SELECT statement are matched against the column names of the table to ...
Lukasz Szozda's user avatar
-4 votes
1 answer
97 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
0 votes
0 answers
88 views

If a value already exists in a table, how do I update the current record and add the new record as a new row? This is the current upsert query: UPDATE d SET d.[AccountId] = S.[Account_Number], ...
Terri Lowe's user avatar
2 votes
2 answers
108 views

After inserting a single row of data into a table (always a single row), I'd like to return to the application code the relative position of that row based on an order by clause. Thus, the application ...
Gary's user avatar
  • 3,226
-1 votes
2 answers
166 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
1 vote
0 answers
64 views

I have built Turbodbc 5.1.2 from source with simdutf 7.3.0, Python 3.11. When trying to insert 150,000 rows of 46 columns to a MySQL 8.0 InnoDB table, Turbodb takes about 190s, compared to 15s with my ...
GBPU's user avatar
  • 684
-1 votes
1 answer
77 views

I'm not a SQL expert. I'm trying to make a insert from a select, but I would like to change two columns using the data from a temporary table. I'm trying to reuse the data from an existing register ...
Iguti's user avatar
  • 7
1 vote
1 answer
132 views

I am experiencing performance issues with an INSERT INTO target_table SELECT ... FROM source_table [WHERE ...] [GROUP BY ...] query in my Apache Doris cluster (version 2.0.8). The SELECT part of the ...
Michael's user avatar
  • 95
0 votes
2 answers
164 views

I'm using a Postgres 9.5 database with a front of Spring Boot. On the database end I have an event_attendee table that users can insert attendees into. In the table there is a unique index on ...
Walker Farrow's user avatar
-3 votes
1 answer
54 views

I am trying to copy a few fields of video information from one MariaDB table to another using a subquery, decoupling some video info from a classified ads table for later refactoring. video: id (int ...
Palm Boom's user avatar
0 votes
1 answer
88 views

The parameters within the Using block don't seem to align. My suspicion is the primary key is at fault, but I am using Scope_Identity. If String.IsNullOrEmpty(InvoiceID_TextBox.Text) Then Using ...
Lyall Pivo's user avatar
-4 votes
1 answer
66 views

I have two tables of same structure and want to insert rows from tableA into tableB. The following example works fine: INSERT INTO tableA (uniqueColA, colB, colC) SELECT uniqueColA, colB, colC ...
sweber's user avatar
  • 3,008
0 votes
1 answer
98 views

Trying to load a JavaScript array into a SQL Server table. I convert the array to a string, however, its format does not immediately translate into something (I know of) to use as separate records to ...
ptownbro's user avatar
  • 1,336
-1 votes
2 answers
103 views

I want to do, in exactly one sqlite3 query, an operation that : Checks for the existence of a value in my table (call it V), written in a row indexed by A If V exists and is equal to V_Param (...
Gattouso's user avatar
0 votes
1 answer
100 views

I am using pymysql connector to do some inserts into my database. I am trying to return whether or not a record was added or updated. My code is import pymysql db = pymysql.connect(host='127.0.0.1',...
Bijan's user avatar
  • 8,816
-1 votes
1 answer
43 views

I have no idea why I can't use an INSERT INTO combined with an WITH statement: drop table if exists testdb.with_insert_into; create table testdb.with_insert_into (id int); with test_data as (select 3 ...
principal-ideal-domain's user avatar
-1 votes
1 answer
69 views

I have 50 datasets. Each dataset has different records of 3 variables each. I want to compile one dataset that all records from 50 datasets for those 3 variables. Example is Table 1: var1 var2 var3 ...
user10969476's user avatar
-1 votes
2 answers
149 views

For my Delphi app with an SQLite database I am using TFDQuery, TFDConnection, TDataSource and TDBGrid components. All fields except AllKeys are VARCHAR. AllKeys is TEXT. Everything is connected ...
Dusko Jovic's user avatar
0 votes
0 answers
159 views

I am trying to refactor/optimize a part of a large architecture. The part I need some advice is how to circumvent the Athena INSERT INTO 100 partitions limit. I have a table, daily_aggregate with ...
dezdichado'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
1 vote
1 answer
108 views

Both a delete and insert (range) on the same table are causing a deadlock due to contention on the same primary key index. I don't understand why. The locks taken are RangeS-S by each process and the ...
HAA's user avatar
  • 65
0 votes
0 answers
101 views

I'm using Apache Airflow to automate the process of loading data into a PostgreSQL database. My workflow consists of multiple tasks where I fetch customer and order data via API, insert or update ...
giovanni simoes delsoto's user avatar
0 votes
2 answers
86 views

File sharing lock count exceeded // python import to access table. If anyone can assist with this you’ll be a life saver. I have a script in python that is attempting to automate a manual process in ...
user28814433's user avatar
0 votes
2 answers
169 views

I'm trying to add addition rows to a CTE table using Oracle SQL and I can't quite get it to work. I've read up and it appears using INSERT INTO () is my best option, but I feel I am missing something ...
Jordan Hersey's user avatar
0 votes
0 answers
40 views

I`m trying to insert multiple lines on a table. Some attributes are being provided in the INSERT, one of them is a client code, provided by a Sequence. How to execute this in one batch. I had to go ...
Fred K's user avatar
  • 1
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
0 votes
0 answers
144 views

I have a DB2 table (map_card_number) that takes 5 minutes to insert 1M rows of data when it has a primary key, compared to 11 seconds to insert the same 1M rows of data when the primary key is removed....
user3376274's user avatar
0 votes
1 answer
73 views

I have this procedure: declare datafix_id$c varchar2(100) := 'BSS-39038'; datafix_version$c varchar2(100) := '1.0'; description$c varchar(100) := 'BSS-39038 [CBM] Добавить ERT_SERVICE_ID на ...
Nadine241197's user avatar
0 votes
1 answer
120 views

I must use raw sql queries in my Symfony 5 application in order to improve the performance of some operations. But I cannot manage to bind my parameters to the query althoug it does not throw any ...
Yoc's user avatar
  • 1
1 vote
1 answer
81 views

I'm trying to insert a pattern string into the PATTERN_SETTING table in Oracle using the following SQL: INSERT INTO PATTERN_SETTING (ID, NAME, PATTERN) VALUES (30, 'Alphanumeric and symbol', '^[a-zA-...
Garry's user avatar
  • 21
1 vote
2 answers
109 views

I have an SQL Insert statement that takes data from various other tables and out joins. The query is run daily and populates from these staging tables. I have an issue in that where field WSL_TNA_CNT ...
Steven Ogilvie's user avatar
0 votes
0 answers
77 views

I am making columns immutable using BEFORE triggers and my current function works fine to protect columns from UPDATE, but I am having some trouble with INSERT. Basically the problem is that my ...
user23968581's user avatar
3 votes
1 answer
185 views

I've got a table with row level permissions enabled. I've got an insert policy for my user, and I've granted permissions for them on specific columns. I added a new column to track the id of whoever ...
Grumpkin's user avatar
4 votes
2 answers
135 views

I have a table that has missing information that needs to be inserted with very specific conditions. However, I am unsure on how to proceed. I have one table that contains an overall view of ...
Andrew C's user avatar
  • 117
0 votes
2 answers
79 views

I have a table in PL/SQL called TABLE_1 with five columns like this: I want to create a new table TABLE_2, which has the same data but adding a new column c5 like the following: The column c5 has ...
Horaci's user avatar
  • 15
0 votes
1 answer
118 views

I have a Pandas df I created from reading an email attachment. When inserting into a SQL Server table I see the following error for Parameter 6 which is Call Length column: Parameter 6 (""):...
LunaLoveDove's user avatar
1 vote
3 answers
129 views

I'm trying to make an insert where the first row is the default item and the other rows are the variants with different language (making a primary key with id and locale) and I was thinking on ...
AlfredoDaAs's user avatar
0 votes
1 answer
50 views

When using insertInto in AWS s3, the data is initially written to the .spark-staging folder and then moved (fake renaming) to the actual location in batches of 10 files at a time. Moving staging data ...
scalactic's user avatar
0 votes
1 answer
79 views

I’m currently working on a Discord Python bot where I loop through a list of ForumTags and generate an INSERT INTO SQL statement for each object to insert data into a MySQL database. However, I want ...
Razzer's user avatar
  • 891
0 votes
0 answers
73 views

I've this array of strings: $qLastSS_T 2024-07-08 11:56:32 2024-08-08 12:56:32 2024-09-08 13:56:32 2024-10-08 13:56:32 2024-11-08 15:56:32 2024-12-08 16:56:32 and a SQL table like this: Is it ...
ilRobby's user avatar
  • 113
0 votes
1 answer
164 views

In DBeaver version 23.3.4.202402060628 I have the following SQLite3 code (for a high speed injection moulded part and package tracking machine in a factory): -------------------------------------------...
skeetastax's user avatar
  • 1,816
0 votes
1 answer
52 views

I have a table, say, Product (Id, Name): Id Name 1 'one' 2 'two' 3 'three' I have a new version of data that is needed to update the table, with possible duplicate values. For example: Name 'one' 'two'...
Victor Khotin's user avatar
-1 votes
1 answer
57 views

The function alone seems to be working. pgAdmin gave me the thumbs up on it, as well as the table. I tried many different ways to type the function and INSERT INTO portion. I have been working on this ...
devStudent's user avatar
-1 votes
1 answer
89 views

I need to move some values based on expiration date, but unfortunately because the tables are not one to one in number of records I receive an error message when my query is run. I need SQL to be able ...
tcoady's user avatar
  • 13
0 votes
1 answer
89 views

I have code that's trying to load data in batch through the Teradata .Net provider. I'm using the TdDataAdapter approach as follows: using (TdDataAdapter adapter = new TdDataAdapter()) { ...
Yndigo Dream's user avatar
1 vote
0 answers
39 views

insert statements in postgres can use CTEs ("with" expressions). These can come either before or after the insert itself. Is there any difference between one style vs the other? For example, ...
Richard Wheeldon's user avatar
0 votes
1 answer
86 views

I'm attempting to create a new table but altering some of the data from my old table using a INSERT INTO SELECT statement. I'm trying to take a field with numbers and letters and pull out the numbers ...
new067's user avatar
  • 13
-1 votes
2 answers
124 views

I want to prevent inserting data into a table and return 'Error' if 'OrderDate' column is greater than '2021-01-01'. How can I do this by the use of TRIGGER and TRY...CATCH in sql-server v.2019 ...
ArashVN's user avatar
1 vote
1 answer
55 views

I am creating an Exam Management System database. I have a table called Questions: q_id (pk) q_text 1 What is the name of our galaxy? 2 What planet do we live on? And a second table called Choices: ...
Paul's user avatar
  • 13

1
2 3 4 5
119