It turns out that I have created the following table:
cabtm char (3) not null,
cabdoc char(8) not null,
cabdat date,
cabven char (3) not null,
cabcli char (12) not null,
primary key (cabtm,cabdoc),
index cabecera_fkindex1(cabven),
foreign key(cabven)
references vendedor (codven)
on delete no action,
index cabecera_fkindex2 (cabcli),
foreign key (cabcli)
references cliente (codcli)
on delete no action);
and I need to carry out a massive load of data but it appears to me
ERROR 1452 (23000): Can not add or update to child row: a foreign key constraint fails (
actividad1
.cabecera
, CONSTRAINTcabecera_ibfk_2
FOREIGN KEY (cabcli
) REFERENCEScliente
(codcli
) ON DELETE NO ACTION),
I have already searched and can not find the error, could you help me? Thanks