473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Error Code : 1329, No data - zero rows fetched, selected, or processed. MYSQL

I am getting the following error while running a stored procedure in mysql5.0

Error Code : 1329
No data - zero rows fetched, selected, or processed.

I have an stored procedure SP1 which calls stored procedure SP2 and SP2 calls a function F1.

I have run this script from .bat file.

after executing i tried to call stored procedure 1 (update_stock), it gives error listed top.

But if i open stored procedure from sqlyog by clicking on alter procedure and rerun the stored procedure.

next time when i call the procedure it executes properly with out error.

Please help me with some solution.

The basic structre of procedure and function is given below


For eg.


----- stored procedure 1 -------------

DELIMITER $$;

DROP PROCEDURE IF EXISTS `update_stock`$$
CREATE PROCEDURE `update_stock`(upload_date varchar(10))
BEGIN

call update_closingstk(upload_date);

END$$

DELIMITER ;$$



----- stored procedure 2 -------------

DELIMITER $$;

DROP PROCEDURE IF EXISTS `update_closingstk`$$
CREATE PROCEDURE `update_closingstk`(upload_date varchar(10))
BEGIN

declare clsstock int default 0;

set clsstock = get_closing_stk

END$$

DELIMITER ;$$



--- Function 1--------------

DELIMITER $$;

DROP FUNCTION IF EXISTS `scm_db`.`get_closing_stk`$$

CREATE FUNCTION `get_closing_stk`(upload_date varchar(10),productrid int ,pkt2cbb2 int) RETURNS int(11)
BEGIN
declare closingstock int;
select clsstock into closingstock from clsstk_tab where stk_prod_rid=10;

return IFNULL(closingstock ,0);
END$$

DELIMITER ;$$
Jan 25 '08 #1
0 1985

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". The program is a MDI app with threading for...
10
by: Sonnich | last post by:
Hi all! I am (still) running some tests (dispite my problems), and I'd like to know the size of data I have in order to calculate growth. As a test I added some data, 1.69 Gb to be exact to a...
3
by: Ifoel | last post by:
Hi all pls help me How to know "HOW MANY SECOND" we fetched the rows of the record MySQL via Visual Basic 6...? Sample: 321 rows Fetched in 0,234s -> i need this field to load on the FORM...
4
by: Chronictank | last post by:
Hi, as a bit of background (and seeing as it is my first post :)) i am a complete newbie at perl. I literally picked it up a week ago to do this project as it seemed like the best choice for a...
4
by: getmeidea | last post by:
Hi all, I have run a batch file contains, mysql -uroot -proot -Dsample_db < "create_sp.sql" The "create_sp.sql" file contains definition for the stored procedure by the name...
1
by: preejith | last post by:
Error Code : 1329, No data - zero rows fetched, selected, or processed. MYSQL I am getting the following error while running a stored procedure in mysql5.0 Error Code : 1329 No data - zero rows...
2
by: kya2 | last post by:
I am not able to create following store procedure. CREATE PROCEDURE DBSAMBA.InsertDeleteBatch(OUT norows INT ) RESULT SETS 1 LANGUAGE SQL BEGIN part1 DECLARE TOTAL_LEFT INT DEFAULT 0; ...
45
by: angelicdevil | last post by:
i have 2 tables 1 is status_type with field name status and other is users with field username and status now i want that the first listbox lists all status from status type ( this i have achieved...
4
by: ghjk | last post by:
I wan to add some data using php page to mysql db. But I got the error saying "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right...
2
by: kkshansid | last post by:
this is my search page on which i am getting two parameters from previous page but the problem is that as soon as i click any other next pages my sql query fails as it doesnt get these two parameters...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.