Solved

Import huge CSV files into access

Posted on 2001-08-31
3
413 Views
Last Modified: 2007-12-19
I have a macro that is supposed to import a huge csv file (more than 65536 lines) into an access table.  The only records that it imports are those where only column A is populated i.e. blank records.

When I open up the CSV file and save it (so it is only 65536 records) the import works correctly.

The macro uses the "Transfer Text" command with an import specification to create an intermediate table (which is later deleted) and an intermediate text file (which is not deleted).  It then uses an update query to update the real table.

Should I open up the csv file in wordpad and split it into two excel files?

Have you any other suggestions?

It would probably be easier if I e mailed some sample information
0
Comment
Question by:Al
  • 2
3 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 6445138
Did you try to link the .txt file as a table and issue a make-table query to store the result?

Just choose "new-table" and "Link" to get this link...

Nic;o)
0
 

Author Comment

by:Al
ID: 6445212
Nico

The problem is that the macro actually imports 7 files (sorry for saying it only did one)  each with different headings.  The macro makes sure that they all go onto one table and that each record has N/A for categories that do not apply to it.  For example equities (shares) do not have an expiry date, however futures do?  That is why I use the macro.
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 100 total points
ID: 6445232
Hi Al,

It won't change "my aproach". Just link all seven tables and use seven "append" queries to assign the input fields to the wanted result field in the target table.

Clear ?

Nic;o)
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now