Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/04/2009, 14:03
Avatar de brygom
brygom
 
Fecha de Ingreso: marzo-2008
Mensajes: 79
Antigüedad: 16 años, 1 mes
Puntos: 0
Problema con procedimiento almacenado

Hola que tal, haber si alguien me puede hechar una mano ya tengo un buen rato tratando de ver el error en este procedimiento.

Código:
CREATE FUNCTION `usuariobd`.`Test` () RETURNS varchar(150)
BEGIN
  DECLARE resultado varchar(150);
  select perfiles.nombrePerfil into resultado from perfiles where perfiles.idPerfiles=1;
  return resultado;
END;
El error es este:
Script line: 1 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 '' at line 3


Que estaré haciendo mal? gracias por su ayuda. Saludos!