MySQL Forums
Forum List  »  Triggers

Re: Trigger Error
Posted by: Omar Jonguitud
Date: July 21, 2006 08:51AM

Hi Roland, definitely i dont want to raise error because i like. This is my problem:

DECLARE _i_ea_numero int;

SELECT _i_ea_numero = i_ea_numero
FROM
tblEea enc
WHERE
enc.str_suc_clave = new.str_suc_clave and
enc.i_nc_numero = new.i_nc_numero;

/** aqui va otro update ***/


UPDATE tblDea
SET
flo_dea_devueltos = flo_dea_devueltos + new.flo_dnc_cantidad_articulos
WHERE
dea.str_suc_clave = new.str_suc_clave and
dea.i_ea_numero = _i_ea_numero and
dea.ti_ea_num_partida = new.ti_dnc_numpartida;


In the first select, i need the value of a master catalog so i write a select to get the value in a variable that i use later in that update below. If I cant get that value i cant update data in the catalog. So what should i do? Thanks in advance

Options: ReplyQuote


Subject
Views
Written By
Posted
8507
January 12, 2006 09:23PM
3858
January 14, 2006 07:34AM
3683
February 28, 2006 01:03AM
3779
February 28, 2006 01:36AM
3268
July 21, 2006 08:51AM
Re: Trigger Error
2847
July 21, 2006 08:51AM


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.