Hi,

If this kind of question has been asked and answered, I'd appreciate if
somebody can point me to the right direction looking for the answers.

The question is how I should load different external text files into
different columns of the same table.  For instance, file1.txt contains
'ssn name' and file2.txt contains 'ssn grade'.  These two files are
generated by different organizations and we want to put both name and
grade info into the same table.

The table named students contains three columns: ssn name grade.
One sample record is like:

ssn               name        grade
-----             --------      --------
123456789 John Smith 95%

I tried: 

mysql> load data local infile '/home/file1.txt' replace into table
students (ssn,name);

mysql> load data local infile '/home/file2.txt' replace into table
students (ssn,grade);

But the second 'load data' replaces all the stuff that the first one
just loaded.

If I use 'ignore', the grades can not get loaded at all.

Any help would be greatly appreciated.

Bing

Bing Du <[EMAIL PROTECTED], 979-845-9577>
Texas A&M University, CIS, Operating Systems, Unix

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to