Import Sub Records

G

Guest

Hello,

I want to import a text file into access.

Within the file there are type 2 and type 3 records. Each type of record is
identified by the first field of the record which will be "2" or "3".

There are a different number of fields in type 2 records than type 3 records.

The type 2 and type 3 records will not be in any particular order.

Is it possible to import the file into Access or would you recommend that I
use SQL server?

Kind Regards,
Beth
 
G

Guest

I would suggest you create a table that will hold both the type 2 and 3
records. Field Names, at this point are not important. Import the text file
into this intermediate table. The you can extract the records for type 2
into the table for type 2 records and for type 3 into the table for type 3.
You could use either Append queries (one for each type) or VBA.
 
J

John Nurick

Hi Beth,

I'd use grep, awk or Perl (or even a VBA procedure) to filter the file
into separate files of type 2 and type 3 records, each of which could
then be imported separately.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top