Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing records

Status
Not open for further replies.

thesewerguy

Technical User
Joined
Jul 5, 2002
Messages
4
Location
US
I have a table that has 3 columns:
serial#
consumption
datetime

And a large csv file that is already formatted to match the table. I would like to import only those records in the csv that have a specific date and time. I would like to automate this process so can someone point me to some sample code to properly do this? I'm thinking an append query is required?

Thanks.
 
I think you have 2 options,

1. import all the records into a matching temp table then append only the records that you want to the actual table. Then empty your temp table.

2. write a program to open the text file and read each record. If it matches your criteria then insert it into the table.

option 1 will probably be faster.

Simi
 
Thanks for the input Simi. I come from a Visual Foxpro background and it only takes a single line to do what I wanted. Learning to do things in Access is going to be an up hill battle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top