Problema con migración
Publicado por juanma (2 intervenciones) el 14/05/2008 13:22:00
Lo siento de lo aturullado que estoy no he leido el post justo de abajo que hablaba sobre algo parecido a lo que me ocurre.
Estoy intentando ejecutar el siguiente procedure desde el phpMyAdmin en la versión 5.0 de MySQL:
Lo ejecuto con el usuario root@localhost y tiene ALL PRIVILEGES
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
SELECT COUNT(*) INTO param1 FROM huelva;
END
y al ejecutarlo me aparece el siguiente error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT COUNT(*) INTO param1 FROM huelva' at line 3
No se como crear el procedure.
He seguido las indicaciones del post de abajo y ahora mi procedure es así :
CREATE PROCEDURE simpleproc (OUT param1 INT)
READ SQL DATA
BEGIN
SELECT COUNT(*) INTO param1 FROM huelva;
END
Y el error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'READ SQLDATA
BEGIN
SELECT COUNT(*) INTO param1 FROM huelva' at line 2
Estoy intentando ejecutar el siguiente procedure desde el phpMyAdmin en la versión 5.0 de MySQL:
Lo ejecuto con el usuario root@localhost y tiene ALL PRIVILEGES
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
SELECT COUNT(*) INTO param1 FROM huelva;
END
y al ejecutarlo me aparece el siguiente error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT COUNT(*) INTO param1 FROM huelva' at line 3
No se como crear el procedure.
He seguido las indicaciones del post de abajo y ahora mi procedure es así :
CREATE PROCEDURE simpleproc (OUT param1 INT)
READ SQL DATA
BEGIN
SELECT COUNT(*) INTO param1 FROM huelva;
END
Y el error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'READ SQLDATA
BEGIN
SELECT COUNT(*) INTO param1 FROM huelva' at line 2
Valora esta pregunta


0