import text file

  • Thread starter Thread starter iccsi
  • Start date Start date
I

iccsi

I would like to import a text file in to my table.
Is it possible to use append query?
If yes, how can I specify the field name in to my table?
If not, are there any solution for this?


Your information is great appreciated,
 
iccsi said:
I would like to import a text file in to my table.
Is it possible to use append query?
If yes, how can I specify the field name in to my table?
If not, are there any solution for this?
Since there are variations in the method an location of the import utility
as well as a couple ways to do it, I would suggest you push the F1 key and
look it up in help.
You will find a lot of information on the subject.

The above assumes that you have a text file of either fixed or delimited
fields and a delimitor for the end of the record.
Name. Address, phone, DOB <CRLF> is an example of an easy one.
Name<CRLF>
Address<CRLF>
phone<CRLF>
DOB <CRLF>
<CRLF>
Name<CRLF>
Address<CRLF>
phone<CRLF>
DOB <CRLF>
is harder and the solution depends on whether this is a one time import or
not.
 
I would like to import a text file in to my table.
Is it possible to use append query?
If yes, how can I specify the field name in to my table?
If not, are there any solution for this?


Your information is great appreciated,

Sure, if the text file is in a form that Access can read.

I'd suggest using File... Get External Data... Link or (equivalent) VBA code
using TransferText to link to the file. You will then have a linked "table",
and you can base an Append query on it to load data into your local table. As
with any Append query you can append from one fieldname into another:

INSERT INTO tblPeople (FirstName, LastName, MiddleName, Title, Address, City,
State, Postcode)
SELECT Field1, Field2, Field3, Field4, Field5, Field6, Field7, Field8
FROM linkedtextfile;
 
Back
Top