List:General Discussion« Previous MessageNext Message »
From:balaraju mandala Date:April 13 2007 12:14pm
Subject:problem with Procedure and Cursor
View as plain text  
Hi all,

I am getting problem with this Procedure, i am reading the values using a
cursor, and appending them to variable. but i am getting null as output. Can
anybody please tell where is the wrong.

create procedure activity1()
declare done int default 0;
declare pack text;
declare name, logout, login varchar(50);
set pack='';
declare cur1 cursor for select user_name, concat(logindate, ' ', logintime),
concat(logoutdate, ' ',logouttime) from playersloginfo;
declare continue handler for sqlstate '02000' set done = 1;
open cur1;
 fetch cur1 into name, login, logout;
 set pack = concat(pack, name, ',', login, ',', logout,';');
until done end repeat;
select pack;
close cur1;

problem with Procedure and Cursorbalaraju mandala13 Apr
Re: problem with Procedure and CursorPeter Brawley14 Apr