Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/03/2012, 04:17
ferminako
 
Fecha de Ingreso: abril-2010
Mensajes: 298
Antigüedad: 14 años
Puntos: 1
Problema argumentos SP

Buenas resulta que tengo un SP tal que:

Código:
-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `I_Marca`(out res int,
in in_nombre varchar(45))
BEGIN
DECLARE existe INT;
SET existe = 0;
SELECT COUNT(idMarcas) INTO existe FROM marcas WHERE Nombre = in_nombre;
IF (existe > 0) THEN
	SET res = 1;
ELSE
	INSERT INTO marcas VALUES (NULL, in_nombre);
	SET res = 0;
END IF;
END
y cuando lo llamo I_Marca('Nike') me devuelve:

#1318 - Incorrect number of arguments for PROCEDURE db.I_Marca; expected 2, got 1

Como debo llamarlo?

Última edición por ferminako; 03/03/2012 a las 06:09