importing csv file

neilp

New member
Local time
Today, 09:46
Joined
Oct 4, 2001
Messages
9
I have a db that currently requires the manual import of a csv file on a daily basis but I wish to try and automate the import.
Books and advice give guidance on this where the file name is a known constant.
The file I wish to import is created via a cronjob from an Oracle db and ftp'd to a network server and includes the date it was produced.

I have a query to display the max date from the main table as an indication of when the import was last carried out and would wish, if possible, to have a check done to find the csv file(s) where the date part is greater than the last date in the main table and then import the file(s).

The file name format is <<fixedpart>>_2002-mm-dd.csv

Any advice on how to acheive my aim or where to look for a solution would be greatly appreciated.

Thanks in anticipation.

Neilp
 
First, you will need VBA to do this.
You will have to take the max filename. You can do this easily by reading the file names into a table and selecting max (only read the ones you want). Than use DOCMD.TRANSFERTEXT feeding the file name you selected to that command. I would create a module, and a function. Thn you can use your macro to RUNCODE the function name.
 

Users who are viewing this thread

Back
Top Bottom