473,667 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

procedure shows run time error no : 1172

donilourdu
53 New Member
hi

the follwing procedure shows run time error :

DELIMITER $$

DROP PROCEDURE IF EXISTS `rec_detail`.`s p2` $$
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='EN T' or file_status='RE N';
while y2>0 do
select file_id into x from rec_detail.file _index where file_status='EN T' or file_status='RE N';
set y2=y2-1;
end while;

select count(*) into y3 from rec_detail.docu ment_index where document_status ='ENT' or document_Status ='REN';
while y3>0 do
select document_id into x from rec_detail.docu ment_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='EN T' or page_status='RE N';
while y4>0 do
select page_id into x from rec_detail.page _index where page_status='EN T' or page_status='RE N';
set y4=y4-1;
end while;

select count(*) into y5 from rec_detail.othe r_index where other_status='E NT' or other_status='R EN';
while y5>0 do
select other_id into x from rec_detail.othe r_index where other_status='E NT' or other_status='R EN';
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 1247

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

Similar topics

0
1323
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 everything runs fine. Each time after that I get the following error:
1
9702
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 change and successfully Rebound the package associated with the stored procedure. Since then, it is giving a strange problem. When the client executes the program that calls the stored procedure SP1, the stored procedure does not get executed...
12
10395
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 @salesdate as varchar(20),
7
2005
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 Nullreference error when I try to call the procedure on the main form. ie. Module 1 contains
5
4255
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 text file has that error. Is it possible that i can handle that error during processing some thing i mean ignore line, email so that my process will not be interrupt. Error: Invalid Procedure call or argument Run time error 5
3
427
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 operations, mostly matrix inversion and trasposition. The dimentions of the matrices used are about 29x19,19x19 and 29x29. During the calculation, I noticed an apparent error of inverion of a 19x19 matrix. Denote this matrix as KK, U=KK^ -1, I found...
6
2465
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 'Table/View/StoredProc' row source type. The row source itself is a stored procedure. When an administrator opens this form, he sees data in the list box. Profiler shows a correct command 'EXEC <stored procedure<parameters>'. That is allright.
0
3177
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 fine. Now we decided to move from mainframe IMS-DB2 to Windows 2003 server-DB2 UDB for LUW 9.5.
0
4701
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 creation of the table from the proc and then compile it. 2. Run the insert also as dynamic sql. Remember dynamic sqls don't go through semantic check at compile time.
0
8367
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8889
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.