You are here: Re: Quick question, need to pump CSV data into database « PHP SQL « IT news, forums, messages
Re: Quick question, need to pump CSV data into database

Posted by Hank on 09/26/06 18:50

On 22 Sep 2006 16:09:16 -0700, halbenca@gmail.com wrote...
>
>I have a CSV file with 5 columns and about 20000 lines. Is there a
>simple utility out there that will convert this file into a conforming
>text file I can then proceed to import into my database via Web
>interface phpMyAdmin? These are the confines I have to work within as
>I have to import it from the Web access of phpMyAdmin, any solutions or
>ideas? BEST REGARDS, Danny
>


Some SQL programs like MySQL and PostgreSQL include a method to restore or
update your database from a file. As an example I can create a tab delimited
file that looks similar to this...

COPY "table_name from stdin;
[DATA HERE]
\.

Then just just use a shell command to make the update...

# psql -a -f /path/to/myfile database_name

Hank
--
Help a Community by Participating in Ours
We donate your subscription fees to the charity you choose
100% of your first month, 10% thereafter.
http://newsguy.com/charity.asp

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация