Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/08/2009, 17:42
finord
 
Fecha de Ingreso: mayo-2005
Mensajes: 51
Antigüedad: 19 años
Puntos: 0
Respuesta: fallo en trigger

Hola, me da otro error
Código:
consulta SQL: 

delimiter && CREATE TRIGGER tvp_scon BEFORE INSERT ON pos_tpv
FOR EACH
ROW BEGIN 
IF NEW.did =0
THEN 
UPDATE pos_stock SET cta = cta - NEW.cta WHERE (
pid,
LOCAL 
) = ( NEW.pid, NEW.LOCAL ) ;



MySQL ha dicho:  
#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 'delimiter &&
CREATE TRIGGER tvp_scon BEFORE INSERT ON pos_tpv 
FOR EACH ROW B' at line 1
He probado a cambiar los && por //, y en el 'end&&' por 'end;//'. Pero me da otro error.

Espero q alguien me pueda indicar donde estar el fallo.

salu2