Showing posts with label Data Migration. Show all posts
Showing posts with label Data Migration. Show all posts

Sunday, June 9, 2013

import large csv files intp mysql

you can edit the php.ini

or

i am using XAMPP 1.8.1 on Windows 7 Ultimate Edition

my xampp directory >>> D:\xampp
and database >>> sampledb

copy the data file inside D:\xampp\mysql\data\sampledb

CREATE TABLE IF NOT EXISTS `table2` (
  `FirstName` text,
  `LastName` text,
  `Company` text,
  `Address` text,
  `City` text,
  `County` text,
  `State` text,
  `ZIP` text,
  `Phone` text,
  `Fax` text,
  `Email` text,
  `Web` text
)

* this is not may not be the ideal way create table
   really wanted to create the table in with the loading of data and add the auto-incremental field

my data file is around 22MB and 349996 rows

LOAD DATA INFILE 'data.txt' INTO TABLE table2
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY '\r\n'
  IGNORE 1 LINES;


Saturday, January 14, 2012

Excel Fills Gaps in Data


 as you can see there gaps in the excel data that i need to upload into the mysql database
 i added this function =IF(D23="",E22,D23)

About

Blogger templates