Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Import Dbf to MySQL Automaticaly (like a DTS in SQL)

Posted on 2003-10-28
5
Medium Priority
?
1,077 Views
Last Modified: 2011-09-20
Hi, I need some help, sorry but my english is not good...
weel.. I´ll try to explain... I must publish a database in the web and I´am using MySQL, the source are Dbf files...And needs to be refreshed whit the latest rows.
I need a program that schedule that job, and I have no idea which I have to use...
Please, HELP MEEEEEEEE!!!!!!! :-(
Thanks
Leandro  
0
Comment
Question by:budadormilon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Accepted Solution

by:
Squeebee earned 252 total points
ID: 9635871
Can you schedule the output of the rows to CSV? If so, you can schedule the input of the rows from CSV.
0
 
LVL 2

Assisted Solution

by:doryllis
doryllis earned 248 total points
ID: 9637886
I would suggest an export from your original file format to a delimited form (something where there is a separating character between each field in a simple ASCII-type file) .  I prefer to use the | (pipe) character if there is any chance of commas in your data. MySQL automatically assumes that the delimiting character is a tab.

Once you have your data file, you can use MySQL LOAD DATA INFILE syntax to pull in the delimited file.

From a MySQL prompt

LOAD DATA INFILE '/localpath/filename.txt'
   INTO TABLE table_name
   FIELDS TERMINATED BY ','  --This line can be changed to indicate whatever your field delimiter is.

If all of the data in your file fits the table name then your fine.  Otherwise, if you run into problems you can fool around with the text file itself and see if there are loose characters around.  There are also more options available for the LOAD DATA INFILE command.

Good Luck,
Dory
0
 

Expert Comment

by:bradylanter
ID: 14030631
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

730 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