Solved

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

Posted on 2007-03-19
2
1,073 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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 …

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now