Greetings.
I have some daily transactions in a tab delimited text file which I import into my database and then file the transaction files to a folder.
I found out there is a flaw in one of the update queries in the database and now I have to fix about 39000 records.
All of these records are contained in the aforementioned transaction files, so if I can bring them all back into the database, I can do an update query and fix the problem (instead of typing 39000 fixes!).
Now for the help part… how can I read in all 153 text files? They use the same import specification, so that’s not a problem. And I have a method for dealing with a daily file. But how can I loop - read and load – through 153 files? Can I do a
FOR
open *.txt
import
append to table
close *.txt
NEXT?
I would think I would only hit the same file over and over again. Can a variable be loaded with the file name from a folder? Maybe there is a way to merge all the files into one and then just import the one? The file names are date-ish (like 9982003.txt, 992003.txt, 9102003.txt, etc.) if that gives any help.
Thanks for your thoughts on this.
LJ
I have some daily transactions in a tab delimited text file which I import into my database and then file the transaction files to a folder.
I found out there is a flaw in one of the update queries in the database and now I have to fix about 39000 records.
All of these records are contained in the aforementioned transaction files, so if I can bring them all back into the database, I can do an update query and fix the problem (instead of typing 39000 fixes!).
Now for the help part… how can I read in all 153 text files? They use the same import specification, so that’s not a problem. And I have a method for dealing with a daily file. But how can I loop - read and load – through 153 files? Can I do a
FOR
open *.txt
import
append to table
close *.txt
NEXT?
I would think I would only hit the same file over and over again. Can a variable be loaded with the file name from a folder? Maybe there is a way to merge all the files into one and then just import the one? The file names are date-ish (like 9982003.txt, 992003.txt, 9102003.txt, etc.) if that gives any help.
Thanks for your thoughts on this.
LJ