Working around Access field limits

G

Guest

I am trying to import a txt file which exceeds the 255 field limitation in Access. How can I get around this? Please explain in layman's terms (I understand Access but I am not a programmer ;)). Thanks!
 
E

Ed

Do you need all 255? If not you could change the input spec to eliminate a
few. Import part into 1 table and the rest into another. Be sure to include
a unique key into both and then join what you need together into a query.

--
Ed

Remove the capital ST spam trap
when replying directly to me.


SusanC said:
I am trying to import a txt file which exceeds the 255 field limitation in
Access. How can I get around this? Please explain in layman's terms (I
understand Access but I am not a programmer ;)). Thanks!
 
G

Guest

Thanks for the response Ed. I really don't need all of the fields, but the ones I need are of course the last few fields which are currently being dropped when I import the file into Access, since it exceeds the field limit. I certainly could eliminate some fields, but I have no idea how to do that. Can you explain what you mean by "change the input spec to eliminate a few"?
Thanks!
 
J

John Nurick

Hi Susan,

1) If it's a fixed-width textfile, you can just fiddle with the import
specification. Instead of trying to define all the fields that actually
exist in the textfile, define a single wide field that spans multiple
textfile fields that don't want to import. That way you may be able to
get all the fields you are interested in to fit inside the 255-field
limit.

2) If it's a tab-delimited file, you could go to
http://unxutils.sourceforge.net/ and download the package of Windows
versions of Unix utilities. This includes one called "cut" which takes a
textfile and creates a new file containing only the fields you specify.
"cut" also works with other delimiters such as comma , and pipe |.

3) If you've got a CSV file (commas between fields, and text fields
enclosed in quotes), "cut" may not do the job. It will count the fields
wrongly if there are any commas in the data.

If that's the case, things get a bit trickier. I have written a utility
that will convert textfiles with any number of fields into a format that
Access can import, but you need Perl installed on your computer.
 

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