Solved

Any software to convert text files into SQL database automatically??

Posted on 2007-03-19
2
1,082 Views
Last Modified: 2013-11-13
I'm looking for a C++ script or any 3rd party software that converts delimited text files into a MySQL database, preferably to run as a scheduled service or daemon. I would like it to map out the file columns to several tables (a web interface would be nice too). Does anybody know of anything like this?
0
Comment
Question by:bemara57
2 Comments
 

Accepted Solution

by:
joexzhu earned 250 total points
ID: 18753607
Perl fits the best in your situation. You can write a very simple
perl script to do the job. Perl can handle regular expressions
and database connections. If you show me your data,
I can write a script for you.
0
 
LVL 2

Assisted Solution

by:faz136
faz136 earned 250 total points
ID: 18753687
MySQL does that natively:

LOAD DATA LOCAL INFILE '/filename.xxx'
INTO TABLE tablename
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(field1, filed2, field3);

or using the bundled mysqlimport utility:
mysqlimport -L -hHOSTNAME -uUSER -pPASSWORD DATABASE TEXTFILE
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question