Import Text File into Access Based on a Column Criteria

J

Java

How do I import a text file that is tab delimited with the criteria of the
field Code = 300 to a table in MS Access?

Here is a small portion of the text file. The text file is generally huge
about 95 MB.
PNumber EffDate ExpDate CName State Class Code ProgramType ANumber
AAA123511453 06/30/2008 06/30/2009 RedBin Steel AMERICA
CORPORATION MA 8500 100 WC 556677
AAA123511453 06/30/2008 06/30/2009 RedBin Steel AMERICA
CORPORATION MD 8500 100 WC 556677
AAA123511453 06/30/2008 06/30/2009 RedBin Steel AMERICA
CORPORATION LA 8500 100 WC 556677
AAA123511453 06/30/2008 06/30/2009 RedBin Steel AMERICA
CORPORATION KY 8500 100 WC 556677
AAA123511453 06/30/2008 06/30/2009 RedBin Steel AMERICA
CORPORATION KS 9000 100 WC 556677
AAA123511453 06/30/2008 06/30/2009 RedBin Steel AMERICA
CORPORATION KS 8500 100 WC 556677
AAA123518202 06/15/2008 06/15/2009 BTS Contract ,
LTD. MO 9000 300 WC 685853
AAA123518202 06/15/2008 06/15/2009 BTS Contract ,
LTD. AL 7545 300 WC 685853
AAA123518202 06/15/2008 06/15/2009 BTS Contract ,
LTD. AR 8500 300 WC 685853
AAA123518202 06/15/2008 06/15/2009 BTS Contract ,
LTD. AR 7545 300 WC 685853
AAA123518202 06/15/2008 06/15/2009 BTS Contract ,
LTD. FL 7545 300 WC 685853
AAA123518202 06/15/2008 06/15/2009 BTS Contract ,
LTD. MN 7545 300 WC 685853
 
J

Jack Leach

I don't think importing with criteria is an option. You may have to use a
temp and query the temp table to insert the records into your "active" table.

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
J

Java

Unfortunately the file is really huge. This particular file is 95.9 MB Even
trying to link it in the database is extremly slow.

If the criteria had been on the 1st field, I would be able to read the file
line by line, write to a new text file and then import the new text file into
Access. I'm not sure about using a criteria from another column other than
the 1st column.
 

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