Unix Technical Forum

mysqlimport problem with , inside fields

This is a discussion on mysqlimport problem with , inside fields within the MySQL General forum forums, part of the MySQL category; --> I've been trying to import fields that contains the comma character ',' inside double quotes '"', with the results ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 05:49 AM
Scott Hamm
 
Posts: n/a
Default mysqlimport problem with , inside fields

I've been trying to import fields that contains the comma character ','
inside double quotes '"', with the results following:

<code>

mysqlimport --fields-optionally-enclosed-by=""" --fields-terminated-by=,
--lines-terminated-by="\r\n" --ignore-lines=1 --user=root --password shark
"c:\documents and settings\shamm\desktop\result.csv"

Enter password: **********

mysqlimport: Error: Row 48 was truncated; it contained more data than there
were input columns, when using table: result


Line 48:

"48", "14.729606", "10.1.1.22", "10.182.167.209", "TCP", "pop3 > 1111 [SYN,
ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460"



mysql> desc result;
+-------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------+-------+
| No | int(10) unsigned | NO | | | |
| Time | text | NO | | | |
| Source | text | NO | | | |
| Destination | text | NO | | | |
| Protocol | text | NO | | | |
| Info | text | NO | | | |
+-------------+------------------+------+-----+---------+-------+
6 rows in set (0.03 sec)

C:\Documents and Settings\shamm>mysql --version
mysql Ver 14.12 Distrib 5.0.26, for Win32 (ia32)

</code>

--
--------------------------------------------------------------------
`Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
--------------------------------------------------------------------

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:22 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com