append an import

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to make a query that will append an imported file how do I make that
query?
thanks
 
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.)
 
Back
Top