Re: Importing large data sets

2006-07-13 Thread sheeri kritzer

On 6/22/06, Scott Haneda [EMAIL PROTECTED] wrote:

I have two chunks of data to import, one is in this format:
01001 - AGAWAM, MA,01001,0,0,291,249,0,42.070206,-72.622739
Where it is comma sep and partially quoted

The other is in this format
99502 ANCHORAGE,
AK,256,265,1424,1962,1131,528,643,6209,99502,61.096163,
-150.093943
Where everything is in quotes and comma sep

Can someone tell me, how to rapidly import all this data into a table.



Check out mysqlimport:

http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html

particularly the

--fields-optionally-enclosed-by
and
--fields-terminated-by

options.

I'm sure it's too late for you, but you do NOT need to edit things in
a text editor.

-Sheeri

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Importing large data sets

2006-06-22 Thread Scott Haneda
I have two chunks of data to import, one is in this format:
01001 - AGAWAM, MA,01001,0,0,291,249,0,42.070206,-72.622739
Where it is comma sep and partially quoted

The other is in this format
99502 ANCHORAGE, 
AK,256,265,1424,1962,1131,528,643,6209,99502,61.096163,
-150.093943
Where everything is in quotes and comma sep

Can someone tell me, how to rapidly import all this data into a table.
-- 
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com Novato, CA U.S.A.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Importing large data sets

2006-06-22 Thread Karl Larsen

Scott Haneda wrote:

I have two chunks of data to import, one is in this format:
01001 - AGAWAM, MA,01001,0,0,291,249,0,42.070206,-72.622739
Where it is comma sep and partially quoted

The other is in this format
99502 ANCHORAGE, 
AK,256,265,1424,1962,1131,528,643,6209,99502,61.096163,

-150.093943
Where everything is in quotes and comma sep

Can someone tell me, how to rapidly import all this data into a table.
  
   Well you need to design a table that has columns for each set of 
data your entering, and then you will use a INSERT INTO file_name VALUE 
( your data ); and your going to need to change all those  to '. In 
Linux I use the joe editor and it's a simple matter to change all  to '.


Karl


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]