All Questions
Tagged with insert-update stored-procedures
30
questions
0
votes
0
answers
234
views
Stored Procedure: Update or Insert data between two databases on the same mysql server
I am trying to create a procedure to Insert or update data into a user table in a different database on the same MariaDB server. I am using phpMyAdmin.
I have the following two tables:
Database 1: ...
1
vote
1
answer
2k
views
How to not increment sequence when conflict of insert occurs
When a conflict occurs on insert into a table with an auto incrementing id column, the sequence gets bumped causing a gap in the id range, which for me is undesirable.
Here is a simplified version of ...
-2
votes
1
answer
375
views
C# stored procedure insert or update with DataTable problem?
I want to add or update with the code below. I get the following error. How should I edit this code?
Must declare the scalar variable "@UyeID".
Incorrect syntax near the keyword 'ELSE'.
My ...
0
votes
1
answer
282
views
Update query in same stored procedure in Oracle
I want to write the logic of UPDATE for the same table in same stored procedure. Below is my SP.
PROCEDURE INSERT_PROJECT_MST
(
P_PROJECTNO IN NVARCHAR2,
P_CRNO IN NVARCHAR2,
P_APPNAME IN ...
0
votes
0
answers
72
views
Use SSRS 2012 to insert into oracle database table
Currently I have a stored procedure used to populate and update an SSRS report. The report is able to change the country and region that is assigned to the test code using the below scripts :
IF ...
0
votes
1
answer
151
views
Insert valid records from SP into valid table and Invalid records into Invalid SP
I have two stored procedures, which filter the records on the table and give the result. The below are the stored procedures.
SELECT distinct TO_CHAR(sp.RJ_SPAN_ID) AS SPAN_ID
, ...
0
votes
1
answer
41
views
How to minimize process time of the procedure?
I created such a quite complex stored procedure that checks the password from c_sent_messages table if exists in c_passwords table. Then it's entering some messages and updating records from the ...
0
votes
1
answer
610
views
Include both INSERT and UPDATE queries in one SQL Server stored procedure
I need to clear the revenue values from the Stage table from all records and then update the same from the working table. I am trying to do an INSERT and UPDATE in one stored procedure in SQL Server ...
0
votes
1
answer
1k
views
PostgreSQL - multiple insert within stored procedure
I have a client-side entity which contains a list of secondary entities, and this is represented on the DB as a foreign key constraint.
The client-side creation form allows to create both the main ...
0
votes
1
answer
2k
views
Stored procedure INSERT from view into Table based on conditions
My stored procedure calls an API which generates a consumable view of data. I need to insert the records from the generated view into local table.
So far, the procedure looks like below.
The ...
0
votes
0
answers
32
views
checking if the same row exists in the table or not [duplicate]
I am trying to update the table based on the values passed.
I need to check if the same row exists in the table. If it doesn't exist then insert the values into table. If exists the update the ...
0
votes
1
answer
491
views
Parameterless stored procedure to update insert
I am working on a stored procedure that is supposed to insert or update rows in a remote table. I tried to use MERGE, but it is not possible to use MERGE when the target table is a remote.
Can ...
0
votes
2
answers
3k
views
Updating column is not working in Oracle PLSQL
I have a Stored procedure in PLSQL which Inserts and Updates records on the basis of some condition.
Now here the issue is. While Inserting the record for the first time, it inserts records properly ...
0
votes
1
answer
229
views
How to insert new data into a table, then insert new data again to that same table
I don't know the correct term/word for this question, maybe stored procedure? so it may have been answered before. If so please kindly point me to the right direction or edit my question to make more ...
2
votes
3
answers
106
views
INSERT INTO table2 SELECT FROM table1 then UPDATE table1 rows that selected/inserted
I am writing a procedure to copy data from a table data_entry to another table promotional
Table structure of data_entry is as below (excluded non-related fields ) -
CREATE TABLE `data_entry` (
`...