Log in

View Full Version : Import csv file to different tables



Marcster
06-02-2009, 01:12 PM
Hi People,

Is it possible to import one csv file and to split it to ten different tables?.

What I have is a large csv file, over 180MB and 600,000 records.
There is no field headings in this file. But after importing it to a single table, field one will have:
001
002
003
004
005
006
007
008
009
999
What I would like is for ten tables named 001,002 etc... containing the records in the single csv file.

Any ideas?.

Thanks.

Oorang
06-03-2009, 08:31 AM
Do you mean create a table for each unique entry in field one?

Marcster
06-03-2009, 11:52 AM
Hi Aaron,

Some more info:
The csv file has no field headings in it. So can't do a SQL ADO to query/extract data. Or is there a way to do SQL csv without field headings?.

Opening it in Excel 2007 shows all the records in columns as split by a ','.
In Column A there are multiple entries (rows) for 001, 002, 003, 004 etc.
001 will use about 7 columns
002 will use about 51 columns
003 about 10 columns
etc
Have created a macro for smaller csv files for use in Excel 2003 which uses a filter and copy to sheets named 001, 002, 003, etc
But as Excel 2003 has a limit of 65536 rows(records) am unable to use it for large csv files.

What I'm after is a way to make sense of this csv file as some users have Office 2003 not 2007 on their computers. Can't get an upgrade.

So thought about some kind of import to Access tables.
One table named 001 holding all the 001 records in it.
Another table named 002 holding all the 002 records in it.
etc...

mdmackillop
06-07-2009, 03:56 AM
Have you seen this by Chip Pearson (http://www.cpearson.com/excel/ImportBigFiles.aspx)?