MySQL Forums
Forum List  »  Spanish

Ayuda con Procedimiento Almacenado
Posted by: Erick Gomez
Date: August 14, 2008 02:42PM

Que tal?, quisiera saber porque mysql no acepta el siguiente procedimiento, el error es que tengo un error de sintaxis cerca de "'from cld_SESION where PROG_Id=idprograma; END WHILE; DROP TEMPORARY TABLE TEMP;
' at line 9" y no entiendo porque si esta linea la acepta normal en la linea de comandos, gracias.

Espero su respuesta
---------------------------------------------------------------------------
DELIMITER //
CREATE PROCEDURE AsignarItemaPrograma (idprograma int,iditem int)
BEGIN

CREATE TEMPORARY TABLE TEMP (valor integer);
insert into TEMP select SESN_Id from cld_SESION where PROG_Id=idprograma;
select @a:=valor from TEMP;
WHILE (@a IS NOT NULL) DO

Insert into cld_ItemNota values (NULL,aditem,@a,'0');
delete from TEMP where value=@a;
select @a:= from cld_SESION where PROG_Id=idprograma;

END WHILE;

DROP TEMPORARY TABLE TEMP;

END
//

DELIMITER ;



Edited 1 time(s). Last edit at 08/14/2008 02:47PM by Erick Gomez.

Options: ReplyQuote


Subject
Views
Written By
Posted
Ayuda con Procedimiento Almacenado
3163
August 14, 2008 02:42PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.