7 messages in com.mysql.lists.mysqlRe: load txt file into an existing fi...
FromSent OnAttachments
Catleya Mendoza07 Apr 2003 17:42 
Jeremy Zawodny07 Apr 2003 17:55 
Brian McCain07 Apr 2003 18:04 
kent johnson07 Apr 2003 18:51 
Catleya Mendoza07 Apr 2003 21:44 
Jeff Shapiro07 Apr 2003 22:14 
Sherwin T. Ang07 Apr 2003 23:43 
Subject:Re: load txt file into an existing file.........
From:Catleya Mendoza (cmen@mydestiny.net)
Date:04/07/2003 09:44:40 PM
List:com.mysql.lists.mysql

Brian,

My original file:

mysql> select * from pet; +-------+---------+------------+------+ | name | address | birth | sex | +-------+---------+------------+------+ | Marie | Manila | 0000-00-00 | f | | Lei | Manila | 0000-00-00 | m | +-------+---------+------------+------+

when i use "LOCAL DATA INFILE"

load data infile "test.txt" replace into table pet; Query OK, 6 rows affected (0.03 sec) Records: 6 Deleted: 0 Skipped: 0 Warnings: 7

select * from pet; +---------+---------+------------+------+ | name | address | birth | sex | +---------+---------+------------+------+ | Marie | Manila | 2000-12-24 | f | | Lei | Manila | 0000-00-00 | m | | name | | 0000-00-00 | | | Marie | | 2000-12-24 | | | Lai | | 0000-00-00 | | | Clay | | 0000-00-00 | | | Danny | | 0000-00-00 | 19 | | Maribel | | 0000-00-00 | | +---------+---------+------------+------+ 8 rows in set (0.00 sec)

QUESTIONS:

1. why instead replace name Marie it creates another marie, 2. and also the word name....... its appears again .... -:/ 3. Also the birthday why it appears as 0000-00-00...... 3. All i want is to load my new file into my existing file and if theres a the same name it will update/replace the file........

Thanks in advance........ Hope u can help me....... pls....... :-)

lea

Check out the "LOAD DATA INFILE" command: http://www.mysql.com/doc/en/LOAD_DATA.html

----- Original Message ----- From: "Catleya Mendoza" <cmen@mydestiny.net> To: <mys@lists.mysql.com> Sent: Monday, April 07, 2003 5:42 PM Subject: load txt file into an existing file.........

Hi!!!!! good day!!!!!!!!

I just want to know how can i load a text file into an existing file/database using mysql command.

Thanks in advance.

lea