In message <88**************************@posting.google.com >, kuhni
<st************@gmx.de> writes
Hi everybody,
I am totally desperate because I cannot solve a really simple problem:
I have a specific text-file which I want to import into an existing
database. The problem is that the columns have different names so I
receive an error message when importing via the "Get External
Data"-Wizard.
There are two ways you can get around this.
The first and simplest is to import the data into a new table then
create an append query to add the new table to your existing one. Then
delete the temporary table.
Another way is to use the wizard to import the data into a temporary
file but then save the import specifications and use them later,
specifying the destination table in a docmd transfertxt line.
From one of my databases:
DoCmd.TransferText , "Jobserve Import Specification", "Jobserve", fname,
False
The second problem is that this text file includes several rows
without any relevant data, only symbols like "-----" in the various
columns. I cannot change this data (and I cannot import it directly
via a SQL-statement) because it is extracted from a backend system and
I have no influence on those reports.
This may require pre-processing, possibly in a temporary table as
outlined above. Personally, I would pre-process the text file using a
tool such as awk or PERL before importing it.
--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.