append an import

C

cherrynich

I need to make a query that will append an imported file how do I make that
query?
thanks
 
6

'69 Camaro

I need to make a query that will append an imported file

The simplest way would be to use SQL syntax such as the following:

INSERT INTO tblMyTable
SELECT ImportedFieldName AS MyFieldName, ImportedStuff AS MyStuff
FROM [TEXT;HDR=YES;DATABASE=C:\Data\].TextImport.txt;

.... where tblMyTable is the name of the table to append the records to,
ImportedFieldName is the name of the column in the text file that maps to
the MyFieldName field in tblMyTable table, and ImportedStuff is the name of
the column in the text file that maps to the MyStuff field in tblMyTable
table. The imported text file is C:\Data\TextImport.txt, which contains the
names of the columns as "headers" (first row), along with the records of
data to be imported.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 

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