procedimientos almacenados
Hola,
Genero una query dinémicamente y luego quiero trabajar con el resultado que me devuelve la query pero al llamar al procedimiento almacenado siempre me da este error: "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 'NULL' at line 1"
Por ejemplo,
declare resultado int;
SET @s = CONCAT('SELECT inscripcion INTO',resultado,' FROM afedegi_inscripciones WHERE codigo_chip <> "" and id_usuario_web= ',usuario);
PREPARE stmt1 FROM @s;
EXECUTE stmt1;
IF resultado IS NOT NULL THEN
SELECT resultado ;
ELSE
SELECT 2;
END IF;
Alguien me puede ayudar? la sql está bien porque la he probado en phpmyadmin. Porque da ese error?
Muchas gracias
Subject
Views
Written By
Posted
procedimientos almacenados
2932
June 21, 2010 03:02AM
1448
June 21, 2010 06:48AM
2839
June 21, 2010 10:15AM
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.