Hello, I have one question about the 'load data' function.

Below is the what I have for 'actor.txt' for a text file I want to load to table 
'actor'

------------------------------------------------------------
|         ID          |       fFirst       |       Last       
-----------------------------------------------------------
|         2           |     Sean        |      Smith          
-----------------------------------------------------------
|         5           |       John       |      Jones

The columns ID/FIRST/LAST already exist. I just want to overight the data
with this file. But when I do, I get an error :

duplicate entry for key 1 (I guess that's the primary key, which is ID)

Basically, the question is if I can ever just either:

A.) Create a table and with the create synatx, use load data infile. Otherwise, I am 
forced to create default values, and when I use load data infile after, I get 
duplicate errors

OR

B.) Is there a way to overright the data of the table? When I create a table, there 
are 0 records entered. That's why I use these text files. Yet, somehow, it won't be 
inserted. The documentation only shows the syntax, not the solution.

Has anybody had experienced going around this issue? I've tried to no avail. Even the 
gui software people rave about give me errors. But this is my priority, I am sure it's 
something simple.

Thanks for your time. I thought I'd ask to play it safe as I search for answers.

Joel

Reply via email to