import text file

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,
 
M

Mike Painter

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.
 
J

John W. Vinson

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;
 

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