Re: The right query?
Date: Mon, 27 Jul 2009 11:13:28 -0300
Ralf Hackmann wrote:
> I have the following situation.
> I get an csv file from an other application daily and put it in an
> mysql DB, what is not a problem.
> the csv has the following fields f.e. (it has many more and other, but
> that is not relevant)
> In the mySQL DB I whant to put it in a table with additional fields,
> where users can add additional informations.
> F1;F2;A1;A2 (A1,A2 are the Field for the additional informations)
> But at the next day it is possible, that the CSV-File from the other
> applikation has lines deleted and line added (which and how many lines
> are added and deleted I dont know before)
> How must I design my Tables and create my querys, that in the table
> with aditional Field the records are deleted and added, so that I dont
> have to compare each record of both tables in an programming language.
Use a separate staging table and use "not exists". Received on Mon Jul 27 2009 - 16:13:28 CEST