RE: mysqlimport command question
Darryl, Sorry for not responding sooner. Looking at this. First I'd recommend delimiting by something other than tabs. I typically use pipes '|' as my delimiter. Tabs and commas can be problematic for a variety of reasons. Second, double check your dates. All I can think of is SQL Server syntax right now, but I remember having some problems with dates being imported in the past. If memory serves, I had to put them in -MM-DD format. That should clean you're import file up. Regards, Adam -Original Message- From: Darryl Hoar [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 5:10 PM To: 'Fortuno, Adam'; [EMAIL PROTECTED] Subject: RE: mysqlimport command question To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: mysqlimport command question Darryl, Provide a copy of the table's details either with a describe table output or the table's definition and a sample of the input file's top 5-rows. Regards, Adam OK, here is the table structure: mysql describe emp2; ++-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | ++-+--+-+-+---+ | empnum | varchar(4) | YES | | NULL| | | name | varchar(30) | YES | | NULL| | | fname | varchar(20) | YES | | NULL| | | lname | varchar(30) | YES | | NULL| | | email | varchar(60) | YES | | NULL| | | ext| varchar(4) | YES | | NULL| | | listit | char(1) | YES | | NULL| | | bdm| int(11) | YES | | NULL| | | bdd| int(11) | YES | | NULL| | | hdate | datetime| YES | | NULL| | ++-+--+-+-+---+ 10 rows in set (0.00 sec) mysql the first 5 records of emp2.txt are: 100 ALBERT JEFFREYALBERT [EMAIL PROTECTED] N 3 6 04/11/88 101 ALBERT STEVEN ALBERT [EMAIL PROTECTED] N 811 08/19/97 105 ARKEMA DORMANDARKEMA [EMAIL PROTECTED] N 729 10/01/87 110 ARKEMA DUANE ARKEMA [EMAIL PROTECTED] N 428 10/28/91 125 BECKER ALOYSIUS BECKER [EMAIL PROTECTED] N1118 03/01/93 Sorry about the wrap, but in the file each is on its own line (no wrap). Cut and paste causes a wrap in outlook. thanks, Darryl -Original Message- From: Darryl Hoar [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 4:31 PM To: [EMAIL PROTECTED] Subject: mysqlimport command question greetings, I have created a text file in windows (from a database) that has the format empnum name fname lname ext email listit bm bd hd bm, bd are integers and hd is date. I have tried to import using the follow command #mysqlimport -u root -pmypass -d --local iweb emp2.txt it imports the 97 records with 970 errors. When I look at the records created, the empnum field is properly populated, but all other fields are NULL. what am I screwing up here ? thanks, Darryl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?[EMAIL PROTECTED] -- 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]
RE: mysqlimport command question
Darryl, Provide a copy of the table's details either with a describe table output or the table's definition and a sample of the input file's top 5-rows. Regards, Adam -Original Message- From: Darryl Hoar [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 4:31 PM To: [EMAIL PROTECTED] Subject: mysqlimport command question greetings, I have created a text file in windows (from a database) that has the format empnum name fname lname ext email listit bm bd hd bm, bd are integers and hd is date. I have tried to import using the follow command #mysqlimport -u root -pmypass -d --local iweb emp2.txt it imports the 97 records with 970 errors. When I look at the records created, the empnum field is properly populated, but all other fields are NULL. what am I screwing up here ? thanks, Darryl -- 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]
RE: mysqlimport command question
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: mysqlimport command question Darryl, Provide a copy of the table's details either with a describe table output or the table's definition and a sample of the input file's top 5-rows. Regards, Adam OK, here is the table structure: mysql describe emp2; ++-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | ++-+--+-+-+---+ | empnum | varchar(4) | YES | | NULL| | | name | varchar(30) | YES | | NULL| | | fname | varchar(20) | YES | | NULL| | | lname | varchar(30) | YES | | NULL| | | email | varchar(60) | YES | | NULL| | | ext| varchar(4) | YES | | NULL| | | listit | char(1) | YES | | NULL| | | bdm| int(11) | YES | | NULL| | | bdd| int(11) | YES | | NULL| | | hdate | datetime| YES | | NULL| | ++-+--+-+-+---+ 10 rows in set (0.00 sec) mysql the first 5 records of emp2.txt are: 100 ALBERT JEFFREYALBERT [EMAIL PROTECTED] N 3 6 04/11/88 101 ALBERT STEVEN ALBERT [EMAIL PROTECTED] N 811 08/19/97 105 ARKEMA DORMANDARKEMA [EMAIL PROTECTED] N 729 10/01/87 110 ARKEMA DUANE ARKEMA [EMAIL PROTECTED] N 428 10/28/91 125 BECKER ALOYSIUS BECKER [EMAIL PROTECTED] N1118 03/01/93 Sorry about the wrap, but in the file each is on its own line (no wrap). Cut and paste causes a wrap in outlook. thanks, Darryl -Original Message- From: Darryl Hoar [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 4:31 PM To: [EMAIL PROTECTED] Subject: mysqlimport command question greetings, I have created a text file in windows (from a database) that has the format empnum name fname lname ext email listit bm bd hd bm, bd are integers and hd is date. I have tried to import using the follow command #mysqlimport -u root -pmypass -d --local iweb emp2.txt it imports the 97 records with 970 errors. When I look at the records created, the empnum field is properly populated, but all other fields are NULL. what am I screwing up here ? thanks, Darryl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?[EMAIL PROTECTED] -- 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]