Import Sub Records

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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.
 
Back
Top