Hi. I need to know where to start. I need to create a job using SQL Server 2000 that will import data from a text file and insert it into a pre-existing table. The table will get truncated before the import is done. A new file is created only when a batch cycle is run on the mainframe. Normally, Monday - Friday, but occasionally we also get a Sat file. The file that I need to read from has the cycle date in the filename; MM041701.txt, for example. The receiving table has two extra fields that are not part of the text file - a timestamp that needs to be the same date as the filename, and a concatenated field from 3 others in the text file. What I would like to do is schedule the job to run every day. I want it to look for the most recent file, check to see if that file's date is > than the timestamp in the table, and if so, truncate the table and import the file. If it is <=, the program should end. I know how to create a basic DTS import package, but I need help with how to tell it what to look for. (In other words, I need help with the hard part.) Do I add an ActiveX control to the package and create ADO connections, etc, or is there a better way?? BTW, the timestamp is necessary because the contents of this table gets appended to the "master" table. Also, what if the program errored out without importing a legitimate file? I would be missing that day from the master.
Thanks for any guidence you can provide. :
Gladys
Gladys Clemmer
gladys.clemmer@fifsg.com
Thanks for any guidence you can provide. :
Gladys
Gladys Clemmer
gladys.clemmer@fifsg.com