How do you export a table from one access db to another in code ?

B

Becky Hart

I want to export data from one db table to another db but I want it to
export certain data . The information critia will be based upon the date
field I only want to keep 18 months from current date in the one db, and the
rest I want to archieve in to the other database and then delete it out of
the first one to keep only the needed records. Can someone help me with this?
 
D

David Lloyd

Becky:

One approach is to use the SQL "IN" syntax to reference a table in a remote
database.

For example:

INSERT INTO MyLocalTable
SELECT *
FROM MyRemoteTable
IN 'C:\MyRemoteDB.mdb'
WHERE Date > #5/26/04#

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I want to export data from one db table to another db but I want it to
export certain data . The information critia will be based upon the date
field I only want to keep 18 months from current date in the one db, and the
rest I want to archieve in to the other database and then delete it out of
the first one to keep only the needed records. Can someone help me with
this?
 

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