<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - CSV Storage Engine</title>
        <description>Forum for CSV Storage Engine</description>
        <link>http://forums.mysql.com/list.php?127</link>
        <lastBuildDate>Sun, 26 May 2013 06:58:08 +0000</lastBuildDate>
        <generator>Phorum 5.2.19</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?127,585760,585760#msg-585760</guid>
            <title>Script that recognises the name of a column in a CSV file and matches it to the correspondent column, with the same name, in a MySql database (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,585760,585760#msg-585760</link>
            <description><![CDATA[ Hi,<br />
<br />
we are using PHP and MySql for our application.<br />
<br />
we have many CSV files with different fields' order and some fields are empty, for example:<br />
<br />
- CSV1 has the following fields order: name, description, date, address, phone<br />
- CSV2 has the following fields order: address, description, name, date<br />
- CSV3 has the following fields order: name, address<br />
<br />
To upload these data in our database (and then online), we now need to have all the CSVs' fields always in the same order, so for example: name, descrition, phone, address, date. To do this we need to manually move the columns in the CSVs.<br />
<br />
My question is: if the CSV files have the columns in a different order (but with the same field names), is it possible to match a CSV column to its right position in the database, <br />
without having to edit manually the position of the columns in the CSV? <br />
<br />
So basically a script that recognise the name of a column in a CSV file (for ex. address) and match it (and its content) to the correspondent column in our MySql database.<br />
<br />
Many thanks,<br />
Sarah]]></description>
            <dc:creator>Sarah Raniero</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 08 May 2013 14:40:33 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,579080,579080#msg-579080</guid>
            <title>Import Data from CSV - Dont insert records that shows warning(s) or error(s) (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,579080,579080#msg-579080</link>
            <description><![CDATA[ Hello All,<br />
<br />
I'm importing data from .csv file to Mysql db using &quot;LOAD DATA LOCAL INFILE&quot; query.<br />
.csv contains foll: <br />
<br />
ID | Name | Date | Price<br />
<br />
01 | abc  | 13-02-2013 | 1500<br />
02 | nbd  | blahblahbl | 1000<br />
03 | kgj  | 11-02-2012 | jghj<br />
<br />
My Mysql Table contains following columns:<br />
Id INTEGER <br />
NAME Varchat(100)<br />
InsertionTimeStamp Date<br />
Price INTEGER <br />
<br />
MySQL query to load .csv data to the table above :<br />
<br />
LOAD DATA LOCAL INFILE 'UserDetails.csv' INTO TABLE userdetails<br />
FIELDS TERMINATED BY ','<br />
IGNORE 1 LINES<br />
 (Id,Name,InsertionTimeStamp,Price)<br />
 set InsertionTimeStamp = str_to_date(@d,'%d-%m-%Y');<br />
<br />
When I executed the query, 3 records got inserted into the table with 2 warnings<br />
<br />
a) Incorrect datetime value : 'blahblahbl' for function str_to_date<br />
b) Data truncate at row 3 (because of invalid INTEGER for Price column)<br />
<br />
Question :<br />
<br />
1. Is there any way for avoiding data to be inserted in table which shows warnings/errors or the row which has invalid data <br />
<br />
I dont want Row 2 &amp; Row 3 to be inserted as it contains invalid data<br />
<br />
2. For WARNING of Incorrect datetime value above, can I get the row no also?<br />
Basically I want to get exact warning/error with the row number.<br />
<br />
Please help!<br />
<br />
Best Regards!]]></description>
            <dc:creator>connect fc</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 13 Feb 2013 10:49:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,573349,573349#msg-573349</guid>
            <title>data from Excel Sheets(in differtent formats) to Mysql server  import (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,573349,573349#msg-573349</link>
            <description><![CDATA[ <a href="http://www.alexband.net/forum/topics/hunted-season-1-episode-4-online-streaming-free-2012"  rel="nofollow">Hunted Season 1 Episode 4</a> Just about every period associated with Numerous Adjacent Best Product offers from in search oftough luck shows as well as starts with 15age 14 contestants. Every single episode, i dissenter is eradicated, <a href="http://www.alexband.net/forum/topics/blue-bloods-season-3-episode-7-online-streaming-free-in-hd-2012"  rel="nofollow">Blue Bloods Season 3 Episode 7</a> nevertheless throughout rare conditions some sort of double liquidation or perhaps zero liquidation was presented with through opinion on the judgment control panel. Makeovers ar applied to help participants at the outset of the growing season (generally following your 1st or 2nd eradication within the finals), as well as a trip to a worldwide terminus can be timetabled with about ii-thirds of the way over the period (usually <a href="http://www.alexband.net/forum/topics/haven-season-3-episode-8-online-streaming-free-on-movietail-2012"  rel="nofollow">Haven Season 3 Episode 8</a> with 5-6 participants staying).<br />
<br />
Americas Next Top Model Season 19 Episode 11 Online : Over who is going to smash the particular fiercest offer within the cascading down falls is victorious the particular honour of obtaining <a href="http://www.iphone4up.com/forum/topic/366-americas-next-top-model-season-19-episode-11-online-streaming-free/"  rel="nofollow">Americas Next Top Model Season 19 Episode 11</a><br />
 the woman image acceptance this surfaces involving Tyra's household.A brand new edition regarding &quot;North americaazines Up coming Circus tent Modelling&quot;, produced and also organised aside Tyra Banks, dividends having fresh partners, fresh natural talent and a brand new decide the actual audience. The women will certainly battle against eachother to help create the esteemed subject associated with &quot;The united statesersus Subsequent Leading Modelling&quot; and also vie for the life history-establishing choice deal that also includes unexampled companions Smashbox Cosmetics, Nine Western world and also Pvc Newspaper. The actual indicate unearths the actual modification of everyday women into potentially ferocious supermodels, along with individuals <a href="http://www.iphone4up.com/forum/topic/367-nikita-season-3-episode-4-online-streaming-free-in-hd-2012/"  rel="nofollow">Nikita Season 3 Episode 4</a> experiencing regular testing in which determine who can make shortened. Together with coaching aside supermodel Tyra Financial institutions along with contact with large-page mode-marketplace gurus, this finalists vie within a hugely more rapid custom modeling rendering boot camp - an accident program for you to supermodel reputation. <br />
<br />
Sort, exactly who used to coach Team recruits just before conquering you to definitely decease pertaining to failing to kill his or her concentrate on, have been discovered to get kidnapped <a href="http://igpgame.com/forums/topic/5-fringe-season-5-episode-6-online-streaming-free-in-hd/"  rel="nofollow">Fringe Season 5 Episode 6</a> a new girl as well as qualified the woman's as a kid-jewellry. He's the woman's grab a unpredictable volatile to finish that unsuccessful objective. Now Nikita along with Alex really need to get by way of her earlier she kills the Pakistani embassador. Mia, a good hole-and-corner(a) Split agent examining the actual home FTO, third Trend, is charged in the course of a good FBI foray into. Whenever Nikita and also Alex springtime her, <a href="http://soundcloud.com/grimm-season-2-episode-1/grimm-season-2-episode-11"  rel="nofollow">Grimm Season 2 Episode 11</a> your lover turns on these individuals, unveiling to presenting lost belief inwards Section and have became a member of finally Wave's cause. But as Section detects, 3rd Wave's head is in category while using the oral sex of any security company, using the team to fight any Oughout.Ersus. Senator to generate more cash. <a href="http://bleacherreport.com/users/1628355-undercover-boss-season-4-episode-2-online-streaming-free"  rel="nofollow">Undercover Boss Season 4 Episode 2</a><br />
<br />
Nikita Season 3 Episode 4 Online : Now i'm guess When i weren't alone obtaining a little foggy whenever Liza <a href="http://soundcloud.com/shark-tank-season-4/shark-tank-season-4-episode-9"  rel="nofollow">Shark Tank Season 4 Episode 9</a> reunited with her mom and dad -- affectingly collection in order to Florencia plus the Machine's &quot;Never Let Me Proceed&quot; -- as Alex and Nikita seemed on. As the occurrence doubtless emphasised the amount of Nikita has to offer while both equally a tutor and electric potential rear, it turned out great to discover Alex granted yet another deal using true aroused bodyweight, due to the fact Fonseca tends to bring these kinds of command and also shade to <a href="http://bleacherreport.com/users/1628388-jungle-gold-season-1-episode-3-online-streaming-free"  rel="nofollow">Jungle Gold Season 1 Episode 3</a> the occasions.]]></description>
            <dc:creator>dimonddick dimonddick</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Fri, 09 Nov 2012 12:01:11 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,565192,565192#msg-565192</guid>
            <title>Can't load huge CSV file (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,565192,565192#msg-565192</link>
            <description><![CDATA[ Hello,<br />
<br />
My problem is a little bit complicated to understand. I have a csv file (27M) with more than 1048576 lines. <br />
<br />
Firstly, I've tried to load it in a temporal table I've created in mySQl, but when I excecute the follow instruction in MySQL QUery Browser: <br />
<br />
&quot;LOAD DATA LOCAL INFILE 'file.csv'<br />
INTO TABLE Temp FIELDS TERMINATED BY ','<br />
LINES TERMINATED BY '\r\n' IGNORE 1 LINES (column1,column2,column3,Column4,Column5,Column6)&quot;<br />
<br />
The result is &quot;Query Returned no Resulset&quot;.<br />
<br />
Secondly, I've opened the file with Excel (obviously, Excel has told me that is not possible to load the whole file) and I've saved it with only 1048576 lines. Then, when I tried to load the new file again, it works!!!<br />
<br />
I've changed the max_allowed_packet=100M but definitely it doesn't work.<br />
<br />
I've tried delete rows in notepad and I've let the file with 1048576 lines but still doesn't work. It seems that Excel &quot;add something&quot; to the file.<br />
<br />
I hope you understand.]]></description>
            <dc:creator>Fabian Pinzon</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Thu, 16 Aug 2012 10:42:19 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,563313,563313#msg-563313</guid>
            <title>Copy an existing database to another machine (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,563313,563313#msg-563313</link>
            <description><![CDATA[ I want to copy an existing database from one machine to another. How can i export the whole database to a zip file or anyother csv file.]]></description>
            <dc:creator>Deep Lotia</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Mon, 30 Jul 2012 06:05:09 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,420221,420221#msg-420221</guid>
            <title>Export Table to Excel Sheet (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,420221,420221#msg-420221</link>
            <description><![CDATA[ Hello, im wondering, this:<br />
<br />
I have one table, and i want to export it to a CSV file.I know how to use the select * from table INTO OUTFILE '/tmp/test.txt', BUT Thats not the problem.<br />
<br />
For Example:<br />
<br />
TABLE users<br />
------------<br />
id     names<br />
1      jerry<br />
2      michael<br />
<br />
i want this table ordered by fields in CSV, but all appears in the first COLUMN of the excel....<br />
<br />
<br />
CSV FIELDS<br />
-----------<br />
A1=1 jerry<br />
A2=2 michael<br />
<br />
So, how can i put the data, ordered in each field of the excel ?.... like this:<br />
<br />
CSV FIELDS<br />
-----------<br />
A1=1 B1=jerry<br />
A2=2 B2=michael<br />
<br />
My email is <a href="mailto:&#118;&#105;&#99;&#116;&#111;&#114;&#122;&#112;&#56;&#54;&#64;&#104;&#111;&#116;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;">&#118;&#105;&#99;&#116;&#111;&#114;&#122;&#112;&#56;&#54;&#64;&#104;&#111;&#116;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;</a>, THANK YOU VERY MUCH.]]></description>
            <dc:creator>Victor Hernan Zevallos Puppi</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 18 May 2011 06:39:50 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,413596,413596#msg-413596</guid>
            <title>migrating  Huge data from CSV File to mysql (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,413596,413596#msg-413596</link>
            <description><![CDATA[ Hi,<br />
<br />
i need to  migrate a huge(3.6GB) CSV data file to mysql,<br />
I tried with PHP script but it looks like won't work,<br />
<br />
please any one can assist me a way to resolve this problem.<br />
<br />
<br />
thanks :)]]></description>
            <dc:creator>Mahesh Dyade</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Thu, 24 Mar 2011 08:03:30 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,408749,408749#msg-408749</guid>
            <title>date format problem (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,408749,408749#msg-408749</link>
            <description><![CDATA[ I have the following file in CSV format:<br />
<br />
7,748857bb01f0731b58bbabd13a88bfad,<a href="http://www.coloradoboomerangs.com/,Colorado"  rel="nofollow">http://www.coloradoboomerangs.com/,Colorado</a> Boomerangs,12/15/2005 19:31<br />
<br />
When I use import statement from mysqladmin in order to import this csv file into a table in mysql then populated date column show date and time in (0000-00-00 00:00:00) format, which is given below:<br />
<br />
12 	2f87c060c8ada01d4500 	<a href="http://www.cs.stir.ac.uk/~kjt/"  rel="nofollow">http://www.cs.stir.ac.uk/~kjt/</a> 	BibTeX Style Examples 	0000-00-00 00:00:00<br />
<br />
How can I solve this problem so date should be populate like this <br />
<br />
12 	2f87c060c8ada01d4500 	<a href="http://www.cs.stir.ac.uk/~kjt/"  rel="nofollow">http://www.cs.stir.ac.uk/~kjt/</a> 	BibTeX Style Examples 12/15/2005 19:31<br />
<br />
Regards]]></description>
            <dc:creator>ch faisal</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Mon, 21 Feb 2011 09:31:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,385281,385281#msg-385281</guid>
            <title>import CSV file with Spanish Accents (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,385281,385281#msg-385281</link>
            <description><![CDATA[ Hello,<br />
<br />
I need to import a CSV file into my table with Spanish Accents. Tried to import, but the spanish accents are not inserting into the table. I've already applied &quot;SET NAMES UTF-8&quot; and the table Collation as utf8_general_ci. Here is my create query of the table,<br />
<br />
CREATE TABLE `v_customer_master` (<br />
 `cus_master_id` int(10) NOT NULL auto_increment,<br />
 `cus_type` varchar(255) NOT NULL,<br />
 `company_name` varchar(255) NOT NULL,<br />
 `job_title` varchar(150) NOT NULL,<br />
 `name` varchar(255) NOT NULL,<br />
 `last_name` varchar(255) NOT NULL,<br />
 `dob` varchar(30) NOT NULL,<br />
 `tax` varchar(30) NOT NULL,<br />
 `email` varchar(255) NOT NULL,<br />
 `alternate_email` varchar(255) NOT NULL,<br />
 `security_question` varchar(255) NOT NULL,<br />
 `answer` varchar(255) NOT NULL,<br />
 `username` varchar(255) NOT NULL,<br />
 `pwd` varchar(255) NOT NULL,<br />
 `country` varchar(150) NOT NULL,<br />
 `state` varchar(150) NOT NULL,<br />
 `city` varchar(255) NOT NULL,<br />
 `address1` varchar(255) NOT NULL,<br />
 `address2` varchar(255) NOT NULL,<br />
 `zipcode` varchar(20) NOT NULL,<br />
 `phone1` varchar(20) NOT NULL,<br />
 `phone2` varchar(20) NOT NULL,<br />
 `mobile` varchar(15) NOT NULL,<br />
 `fax` varchar(20) NOT NULL,<br />
 `website` varchar(255) NOT NULL,<br />
 `note` text NOT NULL,<br />
 `hear_about` varchar(255) NOT NULL,<br />
 `activity_type` varchar(255) NOT NULL,<br />
 `no_of_emp` varchar(255) NOT NULL,<br />
 `newsletter` varchar(250) NOT NULL,<br />
 `sp_discount` varchar(250) NOT NULL,<br />
 `friend_name` varchar(255) NOT NULL,<br />
 `friend_email` varchar(255) NOT NULL,<br />
 `account_type` varchar(250) NOT NULL,<br />
 `business_type` varchar(150) NOT NULL,<br />
 `tax_zone` varchar(250) NOT NULL,<br />
 `discount` float NOT NULL,<br />
 `currency` varchar(250) NOT NULL,<br />
 `language` varchar(250) NOT NULL,<br />
 `photo` varchar(255) NOT NULL,<br />
 `small_logo` varchar(255) NOT NULL,<br />
 `big_logo` varchar(255) NOT NULL,<br />
 `sign` varchar(255) NOT NULL,<br />
 `assigned_to_master_dist` varchar(250) NOT NULL,<br />
 `assigned_to_dist` varchar(250) NOT NULL,<br />
 `assigned_to_agent` varchar(250) NOT NULL,<br />
 `assigned_to_engineering` varchar(255) NOT NULL,<br />
 `customer_status` varchar(255) NOT NULL,<br />
 `reg_date_time` varchar(250) NOT NULL,<br />
 `last_login_date_time` varchar(250) NOT NULL,<br />
 PRIMARY KEY  (`cus_master_id`)<br />
) ENGINE=InnoDB AUTO_INCREMENT=23101 DEFAULT CHARSET=utf8<br />
<br />
<br />
Can anyone assist me how to go with that.. and explain me briefly how to import the spanish accents into my table.<br />
<br />
Thanks in advance.]]></description>
            <dc:creator>manikandan muthuraj</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Mon, 13 Sep 2010 15:57:19 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,367397,367397#msg-367397</guid>
            <title>Source file with list of path (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,367397,367397#msg-367397</link>
            <description><![CDATA[ Hi<br />
<br />
I have this problem: i must to import a csv file with a list of path in my Mysql DB.<br />
The file is like this:<br />
<br />
&quot;C:\Document\001\file1.jpg&quot;<br />
&quot;C:\Document\001\file2.jpg&quot;<br />
&quot;C:\Document\001\file3.jpg&quot;<br />
&quot;C:\Document\001\file4.jpg&quot;<br />
&quot;C:\Document\001\file5.jpg&quot;<br />
<br />
if i use the &quot;load data&quot; command in the table i have an output like this:<br />
<br />
C:Document001file1.jpg<br />
C:Document001file2.jpg<br />
C:Document001file3.jpg<br />
C:Document001file4.jpg<br />
C:Document001file5.jpg<br />
<br />
the character &quot;\&quot; is lost. I think the problem is that the character &quot;\&quot; is a special character for Mysql.<br />
how can i do to solve this problem?<br />
<br />
Thanks]]></description>
            <dc:creator>D'Auria Francesco</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Thu, 13 May 2010 15:51:42 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,330380,330380#msg-330380</guid>
            <title>Fixed-length fields (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,330380,330380#msg-330380</link>
            <description><![CDATA[ I have a CSV file with fixed-width fields in it. I know how to import them normally:<br />
<br />
FIELDS TERMINATED BY '' ENCLOSED BY ''<br />
<br />
... unfortunately, each field also has a space separating it from the next. I don't want to have to create a mirror table with single-character fields between each one just to import the data, so is there another way? Like a placeholder variable or cast?<br />
<br />
Also, the table fields are VarChar, will that cause an issue as well?]]></description>
            <dc:creator>Patrick Zahra</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 24 Feb 2010 16:27:48 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,281864,281864#msg-281864</guid>
            <title>CSV Engine Undocumented Limitations? (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,281864,281864#msg-281864</link>
            <description><![CDATA[ Can someone explain why I can 'see' ie. SELECT COUNT(*) FROM... only 2,209,217 rows of my 12,338,857 row CSV file?  The file size is about 5GB (should that make a difference?), row size is around 450, all recs have the same len and all fields are fixed length CHARs.  Are there some undocumented limitations at work here?<br />
<br />
For what it's worth...<br />
<br />
mysql&gt; show table status\G<br />
*************************** 1. row ***************************<br />
           Name: m199907<br />
         Engine: CSV<br />
        Version: 10<br />
     Row_format: Fixed<br />
           Rows: 2<br />
 Avg_row_length: 0<br />
    Data_length: 0<br />
Max_data_length: 0<br />
   Index_length: 0<br />
      Data_free: 0<br />
 Auto_increment: NULL<br />
    Create_time: NULL<br />
    Update_time: NULL<br />
     Check_time: NULL<br />
      Collation: latin1_swedish_ci<br />
       Checksum: NULL<br />
 Create_options:<br />
        Comment:<br />
1 row in set (0.00 sec)]]></description>
            <dc:creator>Steve Martin</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Fri, 18 Sep 2009 08:14:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,243709,243709#msg-243709</guid>
            <title>Issue when export a table to CSV file (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,243709,243709#msg-243709</link>
            <description><![CDATA[ Hi all,<br />
<br />
I have a table, in which a particular field may have a string with &quot;\n&quot; char.  So when I try to export this table to csv file, the record with this field will be seperated to two lines, not like other records.  I am using &quot;\n&quot; as LINES TERMINATED BY.  I was trying to use &quot;FIELDS ESCAPED BY '\'&quot;, but got errors.<br />
<br />
I need find a way to replace the &quot;\n&quot; in the filed to white space.<br />
<br />
Thanks,<br />
Jingyu.]]></description>
            <dc:creator>Jingyu Qi</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Sun, 01 Feb 2009 00:01:00 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,241363,241363#msg-241363</guid>
            <title>load data date fields (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,241363,241363#msg-241363</link>
            <description><![CDATA[ Please help me with syntax to load date format data as below. <br />
<br />
table <br />
+-------+-------------+------+-----+---------+-------+ <br />
| Field | Type | Null | Key | Default | Extra | <br />
+-------+-------------+------+-----+---------+-------+ <br />
| name | varchar(10) | YES | | NULL | | <br />
| dte | date | YES | | NULL | | <br />
+-------+-------------+------+-----+---------+-------+ <br />
<br />
data file <br />
<br />
aaa, 5-Jan-2009 <br />
aaa, 5-Feb-2009 <br />
<br />
what should i do to load this data into mysql table. <br />
<br />
i am using below command/syntax but its loading all in this format. <br />
<br />
LOAD DATA INFILE '/tmp/ld.txt' INTO TABLE test1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; <br />
(name,@dte) <br />
SET dte = (str_to_date(@dte, '%d-%m-%y'); <br />
<br />
MySql&gt; select * from test1; <br />
+------+------------+ <br />
| name | dte | <br />
+------+------------+ <br />
| aaa | 0000-00-00 | <br />
| aaa | 0000-00-00 | <br />
<br />
<br />
I want date to be in 2008-01-05 format, Please help me.]]></description>
            <dc:creator>New eba</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Thu, 08 Jan 2009 01:30:02 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,231326,231326#msg-231326</guid>
            <title>How to convert *.ddl to *.sql file (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,231326,231326#msg-231326</link>
            <description><![CDATA[ Hi everbody,<br />
<br />
I am using MySQL database server for my project but i have database file in form of *.ddl...but to run following mysql dump command, i need *.sql file...<br />
<br />
  mysql dbname -uroot -ppass &lt; test.sql<br />
<br />
can anyone give me an idea how to convert *.ddl file into *.sql file...then i can use it easily...I tried by saving this ddl file with sql extension...but when i run mysql dump command it failed because some of the statements in that ddl file are not supported by MySQL..some of those are<br />
<br />
CONNECT TO RXDATABASE;<br />
<br />
CREATE SCHEMA GENRXDB;<br />
<br />
SET SCHEMA=GENRXDB;<br />
<br />
Please help me in this regard]]></description>
            <dc:creator>vasu pampana</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Thu, 23 Oct 2008 11:12:04 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,231061,231061#msg-231061</guid>
            <title>Excessive warning messages on import (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,231061,231061#msg-231061</link>
            <description><![CDATA[ I am drowning in warning messages.  The situation:  I am importing millions of rows of data in different tables. The data comes from an external source.  The data is enclosed in double quotes and comma separated, consistent with RFC 4180.  (There are samples below of the table and the data.)  MySQL issues a warning whenever it encounters an empty field (&quot;&quot;) that is being imported into a decimal column.  I do not want to populate the empty fields with numeric values because they are actually empty and populating them will skew the information. Because the data has decimal fields on every row that are empty, the import process is filling up the hard drive with warning messages.<br />
<br />
A typical warning message is &quot;1366: Incorrect decimal value '' for column 'NBR_FIELD_1' at row 2&quot;, where there is a unique warning message for column of each row.<br />
<br />
Is there a way to stop the warning messages?  Is there another alternative that I'm overlooking?<br />
<br />
(FYI, MySQL issues an error and stops if the empty field is being imported into an INTEGER column.)<br />
<br />
Table Structure<br />
================<br />
<br />
Field                      Type            Collation          Null<br />
-------------------------  --------------  -----------------  ----<br />
NBR_FIELD_1                decimal(9,0)                       NO<br />
VCHAR_FIELD_1              varchar(30)     latin1_swedish_ci  YES<br />
NBR_FIELD_2                decimal(6,0)                       YES<br />
VCHAR_FIELD_2              varchar(30)     latin1_swedish_ci  YES<br />
NBR_FIELD_3                decimal(9,0)                       YES<br />
IS_VIRTUAL                 char(1)         latin1_swedish_ci  YES<br />
VCHAR_FIELD_3              varchar(30)     latin1_swedish_ci  YES<br />
NBR_FIELD_4                decimal(6,0)                       YES<br />
VCHAR_FIELD_4              varchar(30)     latin1_swedish_ci  YES<br />
ARE_CONTIGUOUS             char(1)         latin1_swedish_ci  YES<br />
ARE_MULTIPLES              char(1)         latin1_swedish_ci  YES<br />
IS_AGGREGATE               char(1)         latin1_swedish_ci  YES<br />
NBR_FIELD_5                decimal(12,0)                      YES<br />
ALLOW_OVERSUBSCRIPTION     char(1)         latin1_swedish_ci  YES<br />
NBR_FIELD_6                decimal(12,2)                      YES<br />
NBR_FIELD_7                decimal(18,0)                      YES<br />
NBR_FIELD_8                decimal(18,0)                      YES<br />
USE_IN_PATHS               char(1)         latin1_swedish_ci  YES<br />
USE_IN_NETWORK             char(1)         latin1_swedish_ci  YES<br />
LOAD_TIMESTAMP             datetime                           YES<br />
<br />
<br />
Sample Data:<br />
============<br />
&quot;1028&quot;,&quot;768K&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;N&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;N&quot;,&quot;768000&quot;,&quot;Y&quot;,&quot;0.00&quot;,&quot;768000&quot;,&quot;768000&quot;,&quot;Y&quot;,&quot;N&quot;,&quot;2008.10.14 18:00:15&quot;<br />
&quot;1029&quot;,&quot;832K&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;N&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;N&quot;,&quot;832000&quot;,&quot;Y&quot;,&quot;0.00&quot;,&quot;832000&quot;,&quot;832000&quot;,&quot;Y&quot;,&quot;N&quot;,&quot;2008.10.14 18:00:15&quot;<br />
&quot;1030&quot;,&quot;896K&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;N&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;&quot;,&quot;N&quot;,&quot;896000&quot;,&quot;Y&quot;,&quot;0.00&quot;,&quot;896000&quot;,&quot;896000&quot;,&quot;Y&quot;,&quot;N&quot;,&quot;2008.10.14 18:00:15&quot;<br />
<br />
SQL to perform data load:<br />
=========================<br />
USE MY_DATABASE;<br />
SET SESSION SQL_MODE=&quot;ALLOW_INVALID_DATES&quot;;<br />
TRUNCATE TABLE MY_TABLE;<br />
LOAD DATA INFILE &quot;K:/MySampleData.csv&quot;<br />
	INTO TABLE MY_TABLE<br />
	FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&quot;'<br />
	LINES TERMINATED BY '\r\n';]]></description>
            <dc:creator>Craig Harrington</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Tue, 21 Oct 2008 20:36:29 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,218409,218409#msg-218409</guid>
            <title>DateTime from CSV file (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,218409,218409#msg-218409</link>
            <description><![CDATA[ I was wondering if someone knows how to do this. I have a very large CSV file (44 million+ records, over 1GB) that I have entered into a db using the replace file method described in the MySQL 5.1.23 article. I have a problem with the datetime format already in my file, which is &quot;dd/mm/yy hh:mm:ss&quot; all in one column. Is there a way to automatically format datetime to fit this format? -Thanks]]></description>
            <dc:creator>Jean-Benoit Lesage</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Mon, 14 Jul 2008 14:29:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,216810,216810#msg-216810</guid>
            <title>csv row/records eliminated (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,216810,216810#msg-216810</link>
            <description><![CDATA[ Hello<br />
<br />
Can I get some help please to a seemingly simple problem.  I have a excel/csv file.  The data is in ROWS and Column format.  I want to insert into mysql using the below sql code.  It works but..... <br />
<br />
The PROBLEM IS:  it is broken up into rows/records in mysql,  I need it to ignore the returns or breaks or whatever tells it to go to another row and continue to insert the data into the fields in one record.  Did I explain that right?<br />
<br />
LOAD DATA INFILE 'filename.csv' <br />
INTO TABLE tablename <br />
FIELDS TERMINATED BY ','<br />
(`1`, `2`, `3`, `4`, `5`, `6`)<br />
<br />
I dont know what I am doing so I may not have explained it properly please ask any questions that you may be confused about.]]></description>
            <dc:creator>heather campagna</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 02 Jul 2008 23:29:38 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,216048,216048#msg-216048</guid>
            <title>How to give another name to csv storage engine (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,216048,216048#msg-216048</link>
            <description><![CDATA[ I want to give another name to csv storage engine?<br />
How to do it ?]]></description>
            <dc:creator>advait deodhar</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Fri, 27 Jun 2008 05:54:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,214407,214407#msg-214407</guid>
            <title>Import data from CSV file in a hosted mySQL enviroment (2 replies)</title>
            <link>http://forums.mysql.com/read.php?127,214407,214407#msg-214407</link>
            <description><![CDATA[ I need to import data to a table in a mySQL database from a CSV file. The problem is that my database resides on a ISP:s server so I don't have full access to the mySQL console. Also I need to schedule this import to be run every night. Any ideas ? (cause I have tried everything and is now fairly desperate)]]></description>
            <dc:creator>Johan Skånberg</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Sat, 20 Jun 2009 08:14:14 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,208621,208621#msg-208621</guid>
            <title>instant flush of csv table (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,208621,208621#msg-208621</link>
            <description><![CDATA[ Hi,<br />
<br />
I just started using a symbolic-linked database with a csv table. It all works fine, but if I edit the csv file and run a select statement within mysql, I don't get the results that I just inserted manually in the csv file. I need to do a flush table. Is it possible to do this instantly. So if the file is edited, mysql flushes the table. Can this be don by, for instance, a trigger? If so, does anyone know how?<br />
Kind regards,<br />
<br />
Matthijs]]></description>
            <dc:creator>Mat private</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 07 May 2008 10:41:39 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,194521,194521#msg-194521</guid>
            <title>problem import data (5 replies)</title>
            <link>http://forums.mysql.com/read.php?127,194521,194521#msg-194521</link>
            <description><![CDATA[ Hello<br />
<br />
I also made a topic in the Newbie section, but until now nobody has give me the right solution.<br />
<br />
I want to import data from a file (txt, csv, ...) into a mysql database. The table has several columns and one of them is a column of the datatype enum.<br />
<br />
...<br />
<br />
mysql&gt; load data infile 'D:\\PRODUCT\\product2.csv'<br />
-&gt; into table PRODUCT<br />
-&gt; fields terminated by ';'<br />
-&gt; optionally enclosed by '&quot;';<br />
ERROR 1265 (01000): Data truncated for column 'Type' at row 1<br />
<br />
example of csv-file:<br />
000001;omschrijving1;19;7;7;&quot;4&quot;<br />
000002;omschrijving2;19;8;7;&quot;4&quot;<br />
000003;omschrijving3;19;9;21;&quot;2&quot;<br />
000004;omschrijving4;19;9;7;&quot;4&quot;<br />
000005;omschrijving5;19;7;9;&quot;4&quot;<br />
000006;omschrijving6;19;7;11;&quot;1&quot;<br />
<br />
Does somebody know a way to import a delimited file in a table with an enum-column?<br />
<br />
Can someone give me an example of a working example?<br />
Is it posssible to display an example of the flat file and the describe of the table and the executed command<br />
<br />
<br />
Thx<br />
<br />
Gert]]></description>
            <dc:creator>Gert V</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Mon, 11 Aug 2008 08:39:20 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,185626,185626#msg-185626</guid>
            <title>well what is the FIELDS ENCLOSED BY value in the excel file ? (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,185626,185626#msg-185626</link>
            <description><![CDATA[ I try to save excel file as csv and import to phpMyAdmin: but excel says there will be some changes de to special char ...I save anyway . <br />
well what is the FIELDS ENCLOSED BY value in the excel file ? How change this ? what is the default ?]]></description>
            <dc:creator>Leonidas Savvides</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Sat, 01 Dec 2007 21:30:29 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,171194,171194#msg-171194</guid>
            <title>Storing the CSV file in my desired location. (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,171194,171194#msg-171194</link>
            <description><![CDATA[ I am using MySQL as a backend tool in my application.I have to export the resultset in CSV format so I am using the query:<br />
&quot;Select * into OUTFILE  'batch' FIELDS TERMINATED BY ',' from Orders &quot;;<br />
I am storing my resultset in the file &quot;batch&quot; but I cannot give a path to store the file(batch) in my desired location,by default it is getting stored in my database folder only.I want to store this file in a separate folder other than my database folder.<br />
<br />
I need urgent help regarding this issue.<br />
Thanks in regards.]]></description>
            <dc:creator>Soumik Basu</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Tue, 04 Sep 2007 12:27:28 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,154709,154709#msg-154709</guid>
            <title>CSV and Date values (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,154709,154709#msg-154709</link>
            <description><![CDATA[ Hi,I'm trying to Load a data file to MySQL 5.0 I'm having problems with a DATE value in the csv file becouse don't accept the EUROPE format <br />
e.g  I have a value 06/05/2007 and MySQL throws me an error :<br />
Incorrect date value: '06/05/2007' for column 'fecha' at row 1<br />
If I put the right format 2007-05-06 work and when I list the table show me the value 06/05/2007 .<br />
What I must do for MySql accept this format(dd/mm/yyyy) from an csv file becouse I test with functions and not accepts.]]></description>
            <dc:creator>Ernesto Oliva</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Fri, 10 Aug 2007 04:49:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,134205,134205#msg-134205</guid>
            <title>i am not able to use BEGIN,END,DECLARE to create stored procedures (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,134205,134205#msg-134205</link>
            <description><![CDATA[ hi All..<br />
i am trying to create a stored procedure using my sql 5.0 and client as 3.2,<br />
stored procedures are creating if i didnt declare any variables and with out using BEGIN and END keyword, but if use any key words like BEGIN,END,DECLARE then it is giving error &quot;you have an error in sql syntax,check manually near line 1&quot;.<br />
what i have to do to add begin,end and declare keyword...<br />
below code is excuting<br />
<br />
create procedure<br />
LOAD DATA<br />
INFILE 'C:/temp/data.csv'<br />
INTO TABLE student_info<br />
FIELDS TERMINATED BY ','<br />
OPTIONALLY ENCLOSED BY '&quot;'<br />
LINES TERMINATED BY '\n'<br />
;<br />
<br />
but if i use the same code to create sp with begin and end key word its giving error<br />
<br />
i am not able to use begin,end ,declare..<br />
please help me any one to resolve this issue,]]></description>
            <dc:creator>sandeshas naik</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 10 Jan 2007 10:53:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,129866,129866#msg-129866</guid>
            <title>Import of data from Excel Sheets(in differtent formats) to Mysql server (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,129866,129866#msg-129866</link>
            <description><![CDATA[ i m having a database in excel sheet ,and it is a large bulk of data ,the problem is all the excel sheets having the same data but in different format,,i  just want ot convert it on MYSQL database format,, please help me out....tell the easiest way to convert it on Mysql database]]></description>
            <dc:creator>vandana ahuja</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 06 Dec 2006 05:34:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,102773,102773#msg-102773</guid>
            <title>CSV Storage Engine and no mmap support (1 reply)</title>
            <link>http://forums.mysql.com/read.php?127,102773,102773#msg-102773</link>
            <description><![CDATA[ Hi All,<br />
I'm trying to build MySQL 5.1.11 on OS/2 - I've built previous versions (lastly 5.0.21) with little trouble but with 5.1.11, the CSV engine is now included by default.<br />
<br />
As my gcc doesn't include support for mmap, compilation fails in ha_tina.cc with munmap undeclared.<br />
<br />
As the CSV engine is now mandatory - there doesn't seem to be a clean way around thing.<br />
<br />
I notice in ha_tina.cc an #ifdef for mmap on Netware - does MySQL 5.1.11 build on Netware at all?<br />
<br />
Any ideas appreciated.<br />
<br />
Cheers,<br />
<br />
Paul.]]></description>
            <dc:creator>Paul Smedley</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Sun, 16 Jul 2006 15:05:12 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,97833,97833#msg-97833</guid>
            <title>Problem with default csv file size (no replies)</title>
            <link>http://forums.mysql.com/read.php?127,97833,97833#msg-97833</link>
            <description><![CDATA[ Hello<br />
<br />
I am using phpmyadmin to upload a csv file to a MySQL database. The problem is that the maximum file size that I can upload is set to 2048kb which is insufficient.<br />
<br />
Can anyone assist me by advising how to increase filesize?<br />
<br />
thanks<br />
<br />
Mel Lewis<br />
UK]]></description>
            <dc:creator>mel lewis</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Wed, 21 Jun 2006 21:05:22 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?127,86882,86882#msg-86882</guid>
            <title>CSV LOAD DATA Question: line term in quoted field (6 replies)</title>
            <link>http://forums.mysql.com/read.php?127,86882,86882#msg-86882</link>
            <description><![CDATA[ Hi there,<br />
I have a windows generated CSV file which I have little or no control over and it has some fields which are optionally enclosed by quotes.<br />
<br />
I use this command as per the instructions:<br />
<br />
LOAD DATA LOCAL INFILE '/tmp/import/my_file.csv'<br />
INTO TABLE import_my_file<br />
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&quot;'<br />
LINES TERMINATED BY '\r\n'<br />
IGNORE 1 LINES<br />
(col1, col2, col3);<br />
<br />
This works well in the sense that if it finds a field that is quoted it ignores FIELD TERMINATORS (commas) within that field until it reaches the closing quote. However  the difficulty I'm having is that it is not ignoring the LINE TERMINATORS within a quoted field.<br />
<br />
For example (illustrative only):<br />
 col1, col2, col3\r\n<br />
 01,&quot;this comma, is ignored&quot;,dougreith\r\n<br />
 02,&quot;the comma, is fine but this windows carriage return\r\n<br />
 will cause problems&quot;,dougreith\r\n<br />
<br />
<br />
I'm hoping somebody else may have come across this issue or just simply know of a neat work around.<br />
<br />
thanks in advance.]]></description>
            <dc:creator>douglas_reith</dc:creator>
            <category>CSV Storage Engine</category>
            <pubDate>Tue, 02 May 2006 13:21:12 +0000</pubDate>
        </item>
    </channel>
</rss>
