Solved

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

Posted on 2003-10-28
5
1,069 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 63 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 62 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
join tables 4 58
update joined tables 2 64
EditableGrid how to fetch rows from MySql in php 14 48
Group By Function Required in PDF Output 21 38
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

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