alexglez1255
26-02-2015, 03:41:25
tengo una tabla de clientes con dos campos que deseo autoincrementarlos
1 consecutivo tipo integer
2 cod_cliente tipo integer
el 1 genere un trigger y generador y lo creo sin ningun problema,
pero a la hora de crear el segundo me manda el siguiente error
aun despues de haber cambiado el nombre del generador, alguien sabe porque
create trigger clientes_bi for clientes
active before insert position 0
as
begin
if (new.cod_cliente is null) then
new.cod_cliente = gen_id(gen_clientes_codcli,1);
end
This operation is not defined for system tables.
unsuccessful metadata update.
DEFINE TRIGGER failed.
attempt to store duplicate value (visible to active transactions) in unique index "RDB$INDEX_8".
1 consecutivo tipo integer
2 cod_cliente tipo integer
el 1 genere un trigger y generador y lo creo sin ningun problema,
pero a la hora de crear el segundo me manda el siguiente error
aun despues de haber cambiado el nombre del generador, alguien sabe porque
create trigger clientes_bi for clientes
active before insert position 0
as
begin
if (new.cod_cliente is null) then
new.cod_cliente = gen_id(gen_clientes_codcli,1);
end
This operation is not defined for system tables.
unsuccessful metadata update.
DEFINE TRIGGER failed.
attempt to store duplicate value (visible to active transactions) in unique index "RDB$INDEX_8".