Fedora Linux Support Community & Resources Center
  #1  
Old 26th May 2012, 03:14 AM
henry2010 Offline
Registered User
 
Join Date: Apr 2010
Posts: 39
linuxfirefox
csv to sql

Is there any way to convert csv files to sql files in fedora. or any package available to convert csv file to sql file.

henry
Reply With Quote
  #2  
Old 26th May 2012, 08:48 AM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,979
linuxchrome
Re: csv to sql

A quick search, using linux csv to sql brings up this.
http://www.thejackol.com/2005/02/28/...sv-into-mysql/

Just putting csv to sql into google brings up several online tools if it's non-sensitive information.
Reply With Quote
  #3  
Old 27th May 2012, 11:22 AM
wireman Offline
Registered User
 
Join Date: Nov 2011
Location: Scotland
Posts: 24
linuxfirefox
Re: csv to sql

Henry, what you're asking is not exactly clear.

CSV files are for storing data whereas SQL is a language for querying data, so converting one to the other doesn't really make sense. Do you mean you want to put your CSV formatted data into a database (as per smr54's link) and then query it (with SQL) or something else?
Reply With Quote
  #4  
Old 27th May 2012, 03:58 PM
errorxp's Avatar
errorxp Offline
Registered User
 
Join Date: Jul 2007
Posts: 371
linuxfirefox
Re: csv to sql

I believe you can use phpmyadmin to import from csv files to mysql database. Although when you've got lots of csv files this approach can be a bit tedious - I ended up creating a python script for importing data to mysql. After that you could export your data to a .sql file (either using phpmyadmin or sqldump for example) if tha'ts what you want.
__________________
these command lines are like casino slot machines, every time I input commands NOTHING HAPPENS

Last edited by errorxp; 27th May 2012 at 04:01 PM.
Reply With Quote
  #5  
Old 27th May 2012, 05:50 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 1,718
linuxfirefox
Re: csv to sql

Which DBMS are you using?
Reply With Quote
  #6  
Old 28th May 2012, 03:02 AM
henry2010 Offline
Registered User
 
Join Date: Apr 2010
Posts: 39
linuxfirefox
Re: csv to sql

My database is Mysql , phpmyadmin is my front end tool. I want to import my data from csv file. I could'nt import data. from sql file data can be imported very easily. hence I want one converter from csv to sql format.

henry
Reply With Quote
  #7  
Old 1st June 2012, 08:57 AM
wireman Offline
Registered User
 
Join Date: Nov 2011
Location: Scotland
Posts: 24
macosfirefox
Re: csv to sql

Then, the way to get csv data into MySQL is via the commandline as shown in the link given by smr54. Or google 'load data infile mysql'
Reply With Quote
Reply

Tags
csv, sql

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Current GMT-time: 12:49 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat