Dear Bing, what about omitting REPLACE? This should simply load the data into your table, adding (inserting) the new records. Regards, -- Stefan Hinz Geschäftsführer / CEO iConnect e-commerce solutions GmbH # www.js-webShop.com www.iConnect.de # Gustav-Meyer-Allee 25, 13355 Berlin # Tel: +49-30-46307-382 Fax: +49-30-46307-388 ----- Original Message ----- From: "Bing Du" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 07, 2001 10:26 PM Subject: load multiple files into the same table at once? > 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 > --------------------------------------------------------------------- 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