Re: Comma Delimited Import Error

2004-06-07 Thread gerald_clark

David Blomstrom wrote:
I just discovered that one of my MySQL tables is
incomplete. I created it by importing a comma
delimited file I had made from a spreadsheet, but it
appears as many as 3,000 rows or so were missing.
So I decided to give it another try. MySQL Front
refused to import it because of some sort of error I
haven't yet identified. Navicat imports it, logging
roughly 80 errors.
When I view the finished table, many of the entries in
the first field are followed by ,. For example...
al,
tx,
Here are a few rows from the comma delimited file I
imported. Do you have a hunch what might be going on
here?
Thanks.
gd,oat,239,,Grenada,nat
gp,oat,240,,Guadeloupe,dep
ht,oat,241,,Haiti,nat
is,oat,242,,Iceland,nat
jm,oat,243,,Jamaica,nat
 

It would be better to post some of the lines that did not import.
Posting a show create table would also help.
	
		
__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Fwd: Comma Delimited Import Error

2004-06-07 Thread Greg Willits
On Jun 5, 2004, at 11:40 PM, David Blomstrom wrote:
Here are a few rows from the comma delimited file I
imported. Do you have a hunch what might be going on
here?
Thanks.
gd,oat,239,,Grenada,nat
gp,oat,240,,Guadeloupe,dep
ht,oat,241,,Haiti,nat
is,oat,242,,Iceland,nat
jm,oat,243,,Jamaica,nat
Do you see where you have two commas together such as
239,,Grenada
If the field that lines up with the field between ,, does not allow 
NULL, then an error will occur. Either redefine the field to allow 
NULL, or use regex on that file to convert ,, to ,, or ,0, as 
appropriate.

-- greg willits
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Comma Delimited Import Error

2004-06-06 Thread David Blomstrom
I just discovered that one of my MySQL tables is
incomplete. I created it by importing a comma
delimited file I had made from a spreadsheet, but it
appears as many as 3,000 rows or so were missing.

So I decided to give it another try. MySQL Front
refused to import it because of some sort of error I
haven't yet identified. Navicat imports it, logging
roughly 80 errors.

When I view the finished table, many of the entries in
the first field are followed by ,. For example...

al,
tx,

Here are a few rows from the comma delimited file I
imported. Do you have a hunch what might be going on
here?

Thanks.

gd,oat,239,,Grenada,nat
gp,oat,240,,Guadeloupe,dep
ht,oat,241,,Haiti,nat
is,oat,242,,Iceland,nat
jm,oat,243,,Jamaica,nat





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Comma Delimited Import Error

2004-06-06 Thread Martin Gainty
David
looking at
http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html
Any of the field- or line-handling options can specify an empty string ('').
If not empty, the FIELDS [OPTIONALLY] ENCLOSED BY and FIELDS ESCAPED BY
values must be a single character.
Addionally it is a good idea to say FIELDS TERMINATED BY ',' FIELDS ENCLOSED
BY ''
LINES TERMINATED BY '\n'
hth,
Martin
- Original Message - 
From: David Blomstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 06, 2004 2:40 AM
Subject: Comma Delimited Import Error


 I just discovered that one of my MySQL tables is
 incomplete. I created it by importing a comma
 delimited file I had made from a spreadsheet, but it
 appears as many as 3,000 rows or so were missing.

 So I decided to give it another try. MySQL Front
 refused to import it because of some sort of error I
 haven't yet identified. Navicat imports it, logging
 roughly 80 errors.

 When I view the finished table, many of the entries in
 the first field are followed by ,. For example...

 al,
 tx,

 Here are a few rows from the comma delimited file I
 imported. Do you have a hunch what might be going on
 here?

 Thanks.

 gd,oat,239,,Grenada,nat
 gp,oat,240,,Guadeloupe,dep
 ht,oat,241,,Haiti,nat
 is,oat,242,,Iceland,nat
 jm,oat,243,,Jamaica,nat





 __
 Do you Yahoo!?
 Friends.  Fun.  Try the all-new Yahoo! Messenger.
 http://messenger.yahoo.com/

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]