List:General Discussion« Previous MessageNext Message »
From:spikerlion Date:September 23 2009 7:22am
Subject:Data import problem with duplicate datasets
View as plain text  

we have two tables associated with a foreign key constraint.
Table A with the primary key and table B with an "on delete cascade" constraint.
We want to delete datasets in Table B if the related dataset in Table A is deleted - that

Now the Problem:
There is a weekly import defined on table A using a "load data infile <FILE> replace
into table A" command.
The problem is the implicit delete/insert from the replace keyword. Therefore the sets in
Table B are deleted.
We are using replace because some datasets have to be modified in some columns in table A.

Is there a possibility to avoid the delete in Table B by importing data in Table A?

Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!*
Data import problem with duplicate datasetsspikerlion23 Sep
  • Re: Data import problem with duplicate datasetsClaudio Nanni23 Sep