<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Import Excel/CSV into MySQL</title>
	<atom:link href="http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/</link>
	<description>01100010 01101100 01100101 01101000</description>
	<lastBuildDate>Tue, 07 Feb 2012 21:10:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Eye Bridge</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-242279</link>
		<dc:creator>Eye Bridge</dc:creator>
		<pubDate>Tue, 08 Mar 2011 05:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-242279</guid>
		<description>Thank you very much for sharing knowledgeable article. i liked it.</description>
		<content:encoded><![CDATA[<p>Thank you very much for sharing knowledgeable article. i liked it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leke Ojikutu (www.lekeojikutu.com)</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-226872</link>
		<dc:creator>Leke Ojikutu (www.lekeojikutu.com)</dc:creator>
		<pubDate>Sat, 17 Jul 2010 02:22:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-226872</guid>
		<description>Thank you so much.  I used a csv file i uploaded from html to php:

$file = realpath($_FILES[&quot;excel_file&quot;][&#039;tmp_name&#039;]);
$file = str_replace(&#039;\\&#039;,&#039;/&#039;,$file);
$sql =&quot;load data local infile &#039;$file&#039; into table demo
fields terminated by &#039;,&#039; 
ENCLOSED BY &#039;\&quot;&#039;  
lines terminated by &#039;\r\n&#039;
(col1,col2)&quot;;</description>
		<content:encoded><![CDATA[<p>Thank you so much.  I used a csv file i uploaded from html to php:</p>
<p>$file = realpath($_FILES[&#8220;excel_file&#8221;][&#8216;tmp_name&#8217;]);<br />
$file = str_replace(&#8217;&#92;&#8217;,&#8217;/&#8217;,$file);<br />
$sql =&#8220;load data local infile &#8216;$file&#8217; into table demo<br />
fields terminated by &#8216;,&#8217; <br />
<span class="caps">ENCLOSED</span> BY &#8216;\&#8221;&#8217;  <br />
lines terminated by &#8216;\r\n&#8217;<br />
(col1,col2)&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Salim Kimanthi</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-223059</link>
		<dc:creator>Salim Kimanthi</dc:creator>
		<pubDate>Wed, 03 Feb 2010 23:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-223059</guid>
		<description>Thanks a lot this was just fantastic after weeks  of racking my brains you were just the angel I was waiting for</description>
		<content:encoded><![CDATA[<p>Thanks a lot this was just fantastic after weeks  of racking my brains you were just the angel I was waiting for</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praneesh</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-222267</link>
		<dc:creator>Praneesh</dc:creator>
		<pubDate>Thu, 07 Jan 2010 06:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-222267</guid>
		<description>Thank u.....it really workedddddddddddddd..............Thank a lot....thousan cheers...!!</description>
		<content:encoded><![CDATA[<p>Thank u&#8230;..it really workedddddddddddddd&#8230;&#8230;&#8230;&#8230;..Thank a lot&#8230;.thousan cheers&#8230;!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: web</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-220713</link>
		<dc:creator>web</dc:creator>
		<pubDate>Mon, 30 Nov 2009 11:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-220713</guid>
		<description>I tried importing .csv files into mysql database using the default values of phpmyadmin and it didn&#039;t work so i did a search and find your tip and changed the default values to yours and it worked fine.</description>
		<content:encoded><![CDATA[<p>I tried importing .csv files into mysql database using the default values of phpmyadmin and it didn&#8217;t work so i did a search and find your tip and changed the default values to yours and it worked fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-218925</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Thu, 29 Oct 2009 04:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-218925</guid>
		<description>I know next to nothing about MySql and coding, but I&#039;ve created a history database using an application built on MySql and PHP. To save time in making changes to one of the tables in my database, I exported it to my Macbook laptop where I made the changes in Excel. My last field in the table, labeled Source, was exported with double quote marks around each entry. When I reimported the data with the double quotes around each source information, I found the data in each entry was truncated. I removed the double quote marks and reimported the data. Now the Source entry for each person shows data from the first six columns in the table: eventID, gedcom, persfamID, eventtypeID, eventdate, and eventdatetr, none of which was visible in the online table before. Any help would be appreciated. Thanks</description>
		<content:encoded><![CDATA[<p>I know next to nothing about MySql and coding, but I&#8217;ve created a history database using an application built on MySql and <span class="caps">PHP</span>. To save time in making changes to one of the tables in my database, I exported it to my Macbook laptop where I made the changes in Excel. My last field in the table, labeled Source, was exported with double quote marks around each entry. When I reimported the data with the double quotes around each source information, I found the data in each entry was truncated. I removed the double quote marks and reimported the data. Now the Source entry for each person shows data from the first six columns in the table: eventID, gedcom, persfamID, eventtypeID, eventdate, and eventdatetr, none of which was visible in the online table before. Any help would be appreciated. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: san</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-215516</link>
		<dc:creator>san</dc:creator>
		<pubDate>Mon, 14 Sep 2009 13:13:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-215516</guid>
		<description>load data infile &#039;C:\Documents and Settings\may\Desktop\attendance.csv&#039; 
into table timesheet1 
fields terminated by &#039;,&#039; 
 
(col1, 
col2, 
@col3, 
col4, 
col5) 
set 
col3 = str_to_date(@col3, &#039;%m/%d/%Y&#039;); 

this actually gives Error:2 File not found error....

but if u replace the path &#039;C:\Documents and Settings\may\Desktop\attendance.csv&#039;  with &#039;C:/Documents and Settings/may/Desktop/attendance.csv&#039; 

it worked for me...

this really saved lot of time. guys try these</description>
		<content:encoded><![CDATA[<p>load data infile &#8216;C:\Documents and Settings\may\Desktop\attendance.csv&#8217; <br />
into table timesheet1 <br />
fields terminated by &#8216;,&#8217; </p>
<p>(col1, <br />
col2, <br />
<code>col3,<br />
col4,<br />
col5)<br />
set<br />
col3 = str_to_date(</code>col3, &#8216;%m/%d/%Y&#8217;); </p>
<p>this actually gives Error:2 File not found error&#8230;.</p>
<p>but if u replace the path &#8216;C:\Documents and Settings\may\Desktop\attendance.csv&#8217;  with &#8216;C:/Documents and Settings/may/Desktop/attendance.csv&#8217; </p>
<p>it worked for me&#8230;</p>
<p>this really saved lot of time. guys try these</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eskimo</title>
		<link>http://www.thejackol.com/2005/02/28/import-excelcsv-into-mysql/comment-page-1/#comment-199629</link>
		<dc:creator>eskimo</dc:creator>
		<pubDate>Tue, 12 May 2009 07:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.thejackol.com/?p=112#comment-199629</guid>
		<description>I couldn&#039;t get any of the below to work, even when I put the file in the default database directory (which was not the database I was working on)

adding the csv file to the C: drive and changing &#039;uniq.csv&#039; to &quot;C:/uniq.csv&quot; worked just as well. :)

Thanks! I have been looking for a solution like this one for a half day now. Works wonders!

[Source: http://dev.mysql.com/doc/refman/5.4/en/load-data.html]

&quot;The LOCAL keyword, if specified, is interpreted with respect to the client end of the connection: 
If LOCAL is specified, the file is read by the client program on the client host and sent to the server. The file can be given as a full path name to specify its exact location. If given as a relative path name, the name is interpreted relative to the directory in which the client program was started. 

If LOCAL is not specified, the file must be located on the server host and is read directly by the server. The server uses the following rules to locate the file: 

If the file name is an absolute path name, the server uses it as given. 

If the file name is a relative path name with one or more leading components, the server searches for the file relative to the server&#039;s data directory. 

If a file name with no leading components is given, the server looks for the file in the database directory of the default database. 

Note that, in the non-LOCAL case, these rules mean that a file named as ./myfile.txt is read from the server&#039;s data directory, whereas the file named as myfile.txt is read from the database directory of the default database. For example, if db1 is the default database, the following LOAD DATA statement reads the file data.txt from the database directory for db1, even though the statement explicitly loads the file into a table in the db2 database: 

LOAD DATA INFILE &#039;data.txt&#039; INTO TABLE db2.my_table;

Windows path names are specified using forward slashes rather than backslashes. If you do use backslashes, you must double them. &quot;

..... for rest of this --- see the URL at the top of this post...</description>
		<content:encoded><![CDATA[<p>I couldn&#8217;t get any of the below to work, even when I put the file in the default database directory (which was not the database I was working on)</p>
<p>adding the csv file to the C: drive and changing &#8216;uniq.csv&#8217; to &#8220;C:/uniq.csv&#8221; worked just as well. :)</p>
<p>Thanks! I have been looking for a solution like this one for a half day now. Works wonders!</p>
<p>[Source: <a href="http://dev.mysql.com/doc/refman/5.4/en/load-data.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.4/en/load-data.html</a></p>
<p>&#8220;The <span class="caps">LOCAL</span> keyword, if specified, is interpreted with respect to the client end of the connection: <br />
If <span class="caps">LOCAL</span> is specified, the file is read by the client program on the client host and sent to the server. The file can be given as a full path name to specify its exact location. If given as a relative path name, the name is interpreted relative to the directory in which the client program was started. </p>
<p>If <span class="caps">LOCAL</span> is not specified, the file must be located on the server host and is read directly by the server. The server uses the following rules to locate the file: </p>
<p>If the file name is an absolute path name, the server uses it as given. </p>
<p>If the file name is a relative path name with one or more leading components, the server searches for the file relative to the server&#8217;s data directory. </p>
<p>If a file name with no leading components is given, the server looks for the file in the database directory of the default database. </p>
<p>Note that, in the non-<span class="caps">LOCAL</span> case, these rules mean that a file named as ./myfile.txt is read from the server&#8217;s data directory, whereas the file named as myfile.txt is read from the database directory of the default database. For example, if db1 is the default database, the following <span class="caps">LOAD</span> <span class="caps">DATA</span> statement reads the file data.txt from the database directory for db1, even though the statement explicitly loads the file into a table in the db2 database: </p>
<p><span class="caps">LOAD</span> <span class="caps">DATA</span> <span class="caps">INFILE</span> &#8216;data.txt&#8217; <span class="caps">INTO</span> <span class="caps">TABLE</span> db2.my_table;</p>
<p>Windows path names are specified using forward slashes rather than backslashes. If you do use backslashes, you must double them. &#8220;</p>
<p>&#8230;.. for rest of this &#8212;- see the <span class="caps">URL</span> at the top of this post&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

