Importing a wide file into access

  • Thread starter Thread starter Steve D
  • Start date Start date
S

Steve D

I am new to Access. I have a file with over 300 fields
that need to be imported into a Access table. Is there
any way to do this without loosing part of the file?

Everytime I try to do the import, I get a message that
some of the data was lost.
 
There is a limit of 255 fields.
You have to split the file somehow.

Perhaps you can open it in Excel and massage it into 2 smaller files with a
common field as a Key.
Then you can re-link them in Access as 2 tables on your key.
 
Hi Steve,

If it's a fixed width textfile or a simple delimited textfile, you can
use the the "nl" and "cut" utilities from
http://unxutils.sourceforge.net/ to split it into two or more narrower
files that can be imported into related Access tables.

(By "simple" delimited, I mean a file that has a single delimiter
character such as a comma or tab between each field, and no occurrences
of the delimiter and no linebreaks in the data itself. (e.g. if the
delimiter is a comma, there must be no commas in the data).

The idea is to use nl to add a line number at the beginning of each
record to serve as a key (unless there's already a primary key in the
data). Then use cut to create two or more new textfiles, each containing
the primary key and between them containing all the fields.

If the file contains delimiters within its data (e.g. a comma-delimited
file in which the text fields are enclosed in quotes
1,"Jones","P.","Mr","123, Acacia Avenue"
) the cut utility can't do the job but there are other ways round it.
 
Thank you, this is the type of information I was looking
for. I will be back to you if I cannot make it work.
 
Back
Top