Question

New to mySQL scripting in general.

Uploading auto generated tsv files into local mySQL server with infile. Windows Scheduler runs batch file which initiates infile upload.

Issue is everytime batch file runs infile process, the entries are duplicated in the table.

Is there a way to make them append instead of simply write? Am I going to need a key for the entries in order for it to recognize the entries?

All help is appreciated. Thanks in advance.

Was it helpful?

Solution

Once you have defined some identifying key and specified it as such in MySQL (i.e. specified it as your PRIMARY KEY or else defined a UNIQUE KEY constraint), then you can use the REPLACE or IGNORE keywords (as appropriate) to your LOAD DATA command. – eggyal 27 mins ago

Information regarding syntax of this process is located here.

Thanks to eggyal for the help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top