Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unknown system variable

Status
Not open for further replies.

dodge20

MIS
Jan 15, 2003
1,048
0
0
US
I am getting this error message on this cursor. I am not sure what is wrong.

ERROR 1193 : Unknown system variable 'no_more_rows'

Code:
DELIMITER $$

DROP PROCEDURE IF EXISTS `link`.`CreateHTTextFiles` $$
CREATE PROCEDURE `link`.`CreateHTTextFiles` ()
BEGIN

DECLARE student_csr CURSOR FOR
SELECT student_name,student_address,student_hometown,student_state,student_major,
student_degree,student_honors,student_parent1,student_parent2,student_misc,
student_misc2,student_misc3,student_misc4,student_hsyear,student_hsname,
student_sort,student_gender,student_schname,student_schamt
FROM student,ht_zips
WHERE student_zip = htz_zip;

DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_rows=1;
SET no_more_students=0;
OPEN student_csr;
student_loop:REPEAT
	FETCH student_crs INTO l_student_name,l_student_address,l_student_hometown,l_student_state,
l_student_major,l_student_degree,l_student_honors,l_student_parent1,
l_student_parent2,l_student_misc,l_student_misc2,l_student_misc3,
l_student_misc4,l_student_hsyear,l_student_hsname,l_student_sort,
l_student_gender,l_student_schname,l_student_schamt
		IF no_more_rows THEN
			LEAVE student_loop;
		END IF;
    SET lstudent_count=lstudent_count+1;
UNTIL nno_more_rows
END REPEAT student_loop;
CLOSE student_csr;
SET no_more_rows=0;
END $$

DELIMITER ;

Dodge20
 
I see there is a type at UNTIL nno_more_rows. I fixed that, but still receive that error.

Dodge20
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top