Import from text file into multiple tables

herbwarri0r

New member
Local time
Today, 17:36
Joined
Apr 21, 2008
Messages
4
Hi all,

I have a task to build a simple data base that can analyse some text files. I have this working in a manual way but have to import a lot of columns as text due to the fields containing different data.

The text files that I'm importing can be retty massive, say 5 million rows max. They begin with a header record which I want to ignore. Then come some records begining with 'CHARGE' and containing 16 fields.

Then some records beging 'ADJUST' with five fields. Then some records begining 'OTHER', these will contain 9 fields. Then there is a single summary record which again I want to ignore.

What I'm asking is will it be possible to import the CHARGE, ADJUST and OTHER records into their own tables?

Thanks for any help you can give.
 
What you will need to do is create a temporary table - either just make it and keep it, clearing after you're done, or make it in SQL and then delete it when you're done.

Make enough fields in the table for all of the data - not every field will be filled for every record, but that's okay.

Then you will need to run some append queries which filter that temporary table for either CHARGE, ADJUST or OTHER and append only those records and fields into their respective tables.
 
Brilliant, thanks. That does make perfect sense.
 

Users who are viewing this thread

Back
Top Bottom