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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File import to Table with validation help

Status
Not open for further replies.

Sonix

Programmer
Mar 5, 2001
16
GB
I'm new to DTS and scripting and want to create a DTS to automate import from a text file (csv) into a database table using the following rules. The text file may be updated a number of times in the day and so I want to fire this routine regulary. Most importantly it must follow the rules.
1. Items in the text file but not in the database are added to the database;
2. Items in the text file and in the database are updated in the database;
3. Items not in the text file but in the database remain in the database unchanged;
4. If the text file does not exist the table then no action is taken;
5. If the text file does not contain a single complete valid record the table should not be changed at all.

Can someone give me some pointers and can I achieve this simply as a VBscript without any other DTS objects?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top