473,387 Members | 1,721 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.

procedure shows run time error no : 1172

donilourdu
hi

the follwing procedure shows run time error :

DELIMITER $$

DROP PROCEDURE IF EXISTS `rec_detail`.`sp2` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`(x varchar(22))
BEGIN
declare y1 int;
declare y2 int;
declare y3 int;
declare y4 int;
declare y5 int;
select count(*) into y1 from rec_detail.box_index where box_status='ENT' or box_status='REN';
while y1>0 do
select box_id into x from rec_detail.box_index where box_status='ENT' or box_status='REN';
set y1=y1-1;
end while;

select count(*) into y2 from rec_detail.file_index where file_status='ENT' or file_status='REN';
while y2>0 do
select file_id into x from rec_detail.file_index where file_status='ENT' or file_status='REN';
set y2=y2-1;
end while;

select count(*) into y3 from rec_detail.document_index where document_status='ENT' or document_Status='REN';
while y3>0 do
select document_id into x from rec_detail.document_index where document_status='ENT' or document_status='REN';
set y3=y3-1;
end while;

select count(*) into y4 from rec_detail.page_index where page_status='ENT' or page_status='REN';
while y4>0 do
select page_id into x from rec_detail.page_index where page_status='ENT' or page_status='REN';
set y4=y4-1;
end while;

select count(*) into y5 from rec_detail.other_index where other_status='ENT' or other_status='REN';
while y5>0 do
select other_id into x from rec_detail.other_index where other_status='ENT' or other_status='REN';
set y5=y5-1;
end while;

END $$

DELIMITER ;


ERROR :
Result consisted of more than one row - Error No1172

But i need all the values to get through x give me a solution
Jan 27 '07 #1
0 1241

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

Similar topics

0
by: winderjj | last post by:
Hi, I am receiving an error when running a stored procedure with the following select statement: SELECT count(pass_num) INTO count FROM eco_class_t; The first time I run the procedure...
1
by: Raquel | last post by:
This is a stored procedure that resides on Mainframe and gets executed on the client by connecting to the mainframe through DB2 connect. It was executing fine till yesterday when I executed a table...
12
by: Bill Nguyen | last post by:
What's the VB syntax to run the CR report using the following SP? I use CrystalreportViewer and ReportDocument. Thanks Bill Here's the SP in SQLserver 2K: CREATE proc mysp_ReportSubmission...
7
by: David | last post by:
Hi, I am having trouble with a form that I have loaded trying to access a procedure on the main form. The trouble seems to be that a Global Array that is declare in a Module is producing a...
5
by: Eric | last post by:
I run a program which read emails from a text file. There is some thing invalid in one or more text file. When program is busy doing parsing it shows that error and process stop. I dont know which...
3
by: lancered | last post by:
Hi dear all, I am using Python2.4.2+NumPy1.0.1 to deal with a parameter estimation problem with the least square methods. During the calculations, I use NumPy package to deal with matrix...
6
by: HJ | last post by:
Hi all, I am experiencing a weird issue and I hope you can help. We are using a Microsoft Access 2003 project (.ade) with an SQL Server 2000 database. One form contains a list box with the...
0
by: SOI_0152 | last post by:
Hi all! Happy New Year 2008. Il hope it will bring you love and happyness I'm new on this forum. I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c. Everything works...
0
by: amit | last post by:
The Table tt_local will be created when you execute the procedure. The table does not exist when you compile it. There are two options 1. Create the global temporary table manually Remove the...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.