Skip to main content

All 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: ...
Lasse Staalung's user avatar
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 ...
Bohemian's user avatar
  • 421k
-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 ...
user3811744's user avatar
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 ...
hud's user avatar
  • 4,701
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 ...
Maria Boggi's user avatar
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 , ...
hud's user avatar
  • 4,701
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 ...
miador's user avatar
  • 358
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 ...
Balaji Pooruli's user avatar
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 ...
Kurobara's user avatar
  • 161
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 ...
Maverick's user avatar
  • 1,426
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 ...
beginner's user avatar
  • 303
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 ...
erasmo carlos's user avatar
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 ...
hud's user avatar
  • 4,701
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 ...
VS1SQL's user avatar
  • 155
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` ( `...
prograshid's user avatar

15 30 50 per page