First line of my .csv file is:
First,Last,Add1,Add2,City,State,Zip,Date,Xcode,Reason
DESCRIBE is:
mysql> describe test;
+--------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| First | varchar(20) | YES | | NULL | |
| Last | varchar(20) | YES | | NULL | |
| Add1 | varchar(50) | YES | | NULL | |
| Add2 | varchar(50) | YES | | NULL | |
| City | varchar(20) | YES | | NULL | |
| State | varchar(10) | YES | | NULL | |
| Zip | varchar(20) | YES | | NULL | |
| XCode | varchar(20) | YES | | NULL | |
| Reason | varchar(50) | YES | | NULL | |
| Date | varchar(20) | YES | | NULL | |
+--------+-------------+------+-----+---------+-------+
10 rows in set (0.09 sec)
I've also tried adding the filed names at the end of my load data
command but that didn't help...
As it sits right now this is the command I'm attempting to use:
mysql> LOAD DATA LOCAL INFILE '/volumes/raider/aml.master.
8.6.07.csv' INTO TABLE test FIELDS TERMINATED BY ',' LINES
TERMINATED BY '\n' IGNORE 1 LINES;
Which displays this:
Query OK, 0 rows affected (0.01 sec)
Records: 0 Deleted: 0 Skipped: 0 Warnings: 0
if I remove the IGNORE 1 LINES; from the end then I get this added
into the table:
A. DREW | Last | Add1 | Add2 | City | State | Zip | Date | Xcode |
Reason
Which is a combination of the first address and the column names.
On Aug 8, 2007, at 3:34 PM, Gary Josack wrote:
Jason Pruim wrote:
Okay, so I have been going crazy trying to figure this out...
All I want to do is load a excel file (Which I can convert to just
about anything) into a MySQL database... Should be easy right?
Here is the command that I have tried: LOAD DATA LOCAL INFILE '/
volumes/raider/AML.master.txt' INTO TABLE current FIELDS
TERMINATED BY '\t' ENCLOSED BY '"' LINES TERMINATED BY '\n';
and here is the error I am getting: | Warning | 1264 | Out of
range value adjusted for column 'Record' at row 1 |
What do I need to change to get this to work? Or what other info
do you need to be able to help me? :)
Thanks!
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]
What is the first line in your text file? Also, can you provide a
DESCRIBE of the table you're trying to insert into?
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]