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() begin 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; repeat fetch cur1 into name, login, logout; set pack = concat(pack, name, ',', login, ',', logout,';'); until done end repeat; select pack; close cur1; end;|