Records are not inserting in to main table while running the mysql stored procedure.

Ads
 

Records are not inserting in to main table while running the mysql stored procedure.

Hi, Im migrating procedures from oracle to MySql.In that procedure records are not inserted into main table from temp table.But im getting msg as "inserted successfully".What could be the reason for that.Can you plz help me with this issue. My Code: BEGIN select concat('Inserting into SD_CHANGE table');
insert into SDCHANGE(CHANGEID,MODIFIEDDATE,PLANSTARTDATE,PLANENDDATE,ACTUALENDDATE,ACTUALSTARTDATE,APPROVALSTATUSID,ASSIGNEDTOID,CHANGEOWNER_ID, CLOSURECODEID,CREATEDATE,CREATEDBYID,DESCRIPTION,ENHANCEMENTAUDIT,HOSTID,IMPACT,SEVERITYID,PRODUCTCTIID, OPERATIONALCTIID,RAISEDLOCATIONID,STATUSID,SLAID,SUMMARY,CHANGEKEY,HISFLAG,USERSAFFECTED,ASRC,FLAG,ACREATIONTIME,TICKETTYPEID) values(vCHANGEID,vMODIFIEDDATE,vPLANSTARTDATE,vPLANENDDATE,vACTUALENDDATE,vACTUALSTARTDATE,vAPPROVALSTATUSID,vASSIGNEDTOID,vCHANGEOWNER_ID, vCLOSURECODEID,vCREATEDATE,vCREATEDBYID,vDESCRIPTION,vENHANCEMENTAUDIT,vHOSTID,vIMPACT,vSEVERITYID,vPRODUCTCTI_ID, vOPERATIONALCTIID,vRAISEDLOCATIONID,vSTATUSID,vSLAID,vSUMMARY,vCHANGEKEY,this,vUSERSAFFECTED,vASRC,'N',CURRENTTIMESTAMP,vTICKETTYPEID); SELECT CONCAT('Inserted Successfully 1 ',vchangeid) as "Result"; COMMIT; UPDATE SDCHANGETMP SET FLAG = 'Y' WHERE CHANGEID = vCHANGEID AND MODIFIEDDATE = vMODIFIEDDATE; IF duplicate_key=1 then begin select CONCAT('Rejected id and last mod time ',vchangeid, vmodifieddate); UPDATE SDCHANGETMP SET FLAG = 'D' WHERE CHANGEID = vCHANGEID AND MODIFIEDDATE = vMODIFIEDDATE; end; else SELECT CONCAT('Inserted Successfully 2 ',vchangeid) as "Result"; END IF; SET duplicate_key=0;
END;

View Answers

Ads









Related Tutorials/Questions & Answers:
Records are not inserting in to main table while running the mysql stored procedure.
Records are not inserting in to main table while running the mysql stored procedure.  Hi, Im migrating procedures from oracle to MySql.In that procedure records are not inserted into main table from temp table.But im getting msg
Insert Data in Table Using Stored Procedure
data into a table using stored procedure. Steps: 1.Create database... of Creating and calling the Stored Procedure in MySQL Database... Insert Data in Table Using Stored Procedure 
Advertisements
exception in thread main while running servlet
exception in thread main while running servlet  I got exception in thread main no such method error while running servlet. I have added...\Tomcat 6.0\webapps\Demo\WEB-INF\lib\mysql-connector-java-5.1.22\mysql-connector
stored procedure
stored procedure  what is stored procedure
JPA 2.1 Stored Procedure Example
in MySQL database and then call the stored procedure in your JPA 2.1 based...;products" table. Here is the sql to create stored procedure: delimiter // CREATE...JPA 2.1 Stored Procedure Example - Lear how to call stored procedures from
problem on jsp, inserting data into table(mysql).
problem on jsp, inserting data into table(mysql).  hello friends, I have a problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table name also is given by the user.My database
stored procedure
stored procedure  on storing values to database using stored procedure it throws an error lyk ADODB.Command error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
deleting all records from a table in mysql
deleting all records from a table in mysql  Hi, I am finding code for deleting all records from a table in mysql. How to delete all rows in mysql...; This will delete all the records from the table. But if you are using auto
deleting all records from a table in mysql
deleting all records from a table in mysql  Hi, I am finding code for deleting all records from a table in mysql. How to delete all rows in mysql...; This will delete all the records from the table. But if you are using auto
Inserting values in MySQL database table
Inserting values in MySQL database table   ... the facility for inserting the values in MySQL database table. Description...; but if any problems comes while inserting the data  in the table
Mysql Declare Procedure
Mysql Declare Procedure        Mysql Declare Procedure is used to define a local variable within... with Example The Tutorial grasp you an example from 'Mysql Declare Procedure
Call Procedure
'. Here is the video tutorial of: "How to create MySQL stored procedure... unit and  task. Stored Procedure can be compiled and executed..._Table The insert into add the records or rows into the table 'stu
duplicate records inserting
duplicate records inserting  in the application i have provided... is i want to avoid duplicate values getting inserted. ex. i am inserting name shashi kumar with the same between them ,records get inserted ,now when i try
update date from stored procedure
update date from stored procedure  how to works on insert,update data from stored procedure.   Insert data using stored procedure
Mysql Find Duplicate Records
Mysql Find Duplicate Records       Mysql Find Duplicate Records is used to find the duplicate Records... 'Mysql Find Duplicate Records'. To grasp and understand example, the select
php inserting date into mysql
php inserting date into mysql  php inserting date into mysql   Here is a php code that inserts date into mysql database. In the given code, data is a database table. <?php table $query_manual = "INSERT INTO data
Mysql Alter Procedure
Mysql Alter Procedure     ... that is executed under one name. Mysql Alter Procedure is used to modify... illustrate an example from 'Mysql Alter Procedure'. To grasp Example, we create
Mysql Alter Procedure
an example from 'Mysql Alter Procedure'. To grasp Example, we create a table... parameter. The procedure include a sql statement that return the records from table... Mysql Alter Procedure     
While running jsp
While running jsp  I found this error when i run the client.jsp can anyone help me javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://localhost:8080/WebService1/MyWebService?wsdl. It failed with: http
Mysql From Table
Mysql From Table       Mysql From Table is used to specify the table from which the records...)); Insert Values into Stu Insert into is used to add the records or rows to the table
Exception while inserting image in oracle using java
Exception while inserting image in oracle using java  import java.sql.*; import java.io.*; class Oracle2 { public static void main(String args... affected: "+stmt.executeUpdate()); } } My Oracle table description is: create table
Inserting Records using the Prepared Statement
the work for inserting the records in 'movies' database table. For this, first... Inserting Records using the Prepared Statement  ... to learn how we will insert the records in the database table by using
JDBC : Duplicate records in a table
JDBC : Duplicate records in a table In this tutorial, you will learn how to find the duplicate records in a table. Duplicate records in a table : You can check for duplicate records of table. You can group record by any of fields
image stored in mysql
image stored in mysql   how does an image store in mysql using java. gime an exam. code. thanks..   Insert Image in MySQL
How to delete excel file records using Store Procedure?
How to delete excel file records using Store Procedure?  Hi.. I have created one Excel file through stored procedure.Now I want to delete records or delete excel file. Thanks
inserting dropdown values into database table
inserting dropdown values into database table   hi i want to insert dropdown values into a database table by using jsp
Mysql Difference
into for inserting a multiple records or rows to the table 'Multiplication...; Mysql Difference is used to return the records that are the outcome of difference between the records in a table. Understand with Example The Tutorial
Mysql Difference
insertion of data in table: The Query insert into for inserting a multiple records...;  Mysql Difference is used to return the records that are the outcome of difference between the records in a table. Understand with Example
Inserting a value to an Enum field in Table
Inserting a value to an Enum field in Table  I'm writing a code that creates a user account and sends the result to the user table in a mysql database. For example, in the user table I have: username varchar(15) PRIMARY KEY
creating and executing stored procedure using hibernate
creating and executing stored procedure using hibernate  I have to execute following query using hibernate DECLARE @i_STARTDATETIME DATETIME DECLARE @i_ENDDATETIME DATETIME DECLARE @o_ERRORCODE INT DECLARE @o_ERRORDESCRIPTION
Lock while inserting/updating database in multithreaded.
Lock while inserting/updating database in multithreaded.  Hi, I am having a multithreaded process which replicates the data from many table to one table. My process runs on 4 threads and all are having different connection

Ads