Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa SQL Records are not inserting in to main table while running the mysql stored procedure.
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


svathi123
Records are not inserting in to main table while running the mysql stored procedure.
0 Answer(s)      3 years and 6 months ago
Posted in : SQL


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;


Advertisement
View Answers

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
into a table using stored procedure. Steps: 1.Create database: To create... Insert Data in Table Using Stored Procedure   ...;); 7.Step to call procedure: We are using CallableStatement to execute a stored
Advertisements
Processing stored procedure in MySQL - SQL
Processing stored procedure in MySQL  Dear All java with mysql developer..... i need to convert my SQL procedure to MySQL database... here is my Stored procedure in SQL.... create or replace procedure INVNAMES (bno
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
error while inserting millions of records - EJB
error while inserting millions of records  Hello, I am using ejb cmp and inserting 1 millions of records but it won't work because trancation time out occurs same problem is occur when i am using hibernate but when i am using
stored procedure
stored procedure  what is stored procedure
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
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
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
Stored Procedure and Trigger
Stored Procedure and Trigger  hello, What is the difference between Stored Procedure and Trigger ?   hii, Triggers once defined are called automatically, there can be no explicit invocation Stored procedure has
What is Stored Procedure?
What is Stored Procedure?  What is Stored Procedure?   Hi, Here is the answer, A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored
Inserting Image into table
Inserting Image into table  In this section , we will insert a image into a table. For inserting image, table's field (in which image will be stored) must be define as "blob". First, Create table'inImage'
receive a ResultSet from a stored procedure
receive a ResultSet from a stored procedure  How do I receive a ResultSet from a stored procedure
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
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
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
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 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
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
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
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
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     
Inserting Data into mysql - SQL
(using php)and inserting the details in a mysql database. Lets take for instance, a csv file named books and a database table named books as well both...Inserting Data into mysql  My sincere apologize for this post. I
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
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
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
Stored Procedures and Functions
in version MySQL 5.0. Stored Procedure is a set of statements, which allow ease and flexibility for a programmer because stored procedure is easy to execute than reissuing the number of individual SQL statements. Stored procedure can call another
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
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 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
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
Advertisements
 

 

 

DMCA.com