Problem solve Get help with specific problems with your technologies, process and projects.

Importing fixed-width data

In this expert response, MySQL guru Mike Hillyer explains how to import information in rows of fixed-width data.

We are in the process of migrating a small Microsoft Access application and information from various mainframe sources onto MySQL. We have not found a reliable way on importing column-delimited data into a table in MySQL. The steps in your previous tip on this subject were not clear. Can you elaborate and also offer info on doing this in an environment like ours? I need to import a column-delimited table where each row is 400 characters wide. Is there a MySQL command, or series of commands, that will let me specify how to import the information contained in each row? For example, Social Security numbers are in columns 1-9, last names are in columns 10-30, first names are in columns 31-51, etc....?

Importing fixed-width data is a common request and, having answered it several times, I have an FAQ entry for it....

You can check it out here.

See the original tip that inspired this question.

This was last published in July 2006

Dig Deeper on Linux servers



Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.