dts & importing multiple txt files

  • Hi

    absolute novice at this but I have been tasked with

    the following:

    Given a dts "import text file" task and a bunch of files scattered in different directories, how do I get to them

    and process each one from the pkg?

    Also, the filename dictates which DB to select - how do I tell DTS which DB to switch to?

    All this most probably, has been covered ad naseam -

    any guidance would be greatly appreciated

    regards

  • This was removed by the editor as SPAM

  • Not sure I understand the first question - "how do I get to them?"  If the locations are fixed and you simply want to cycle through all files (perhaps with a particular name pattern) in the appropriate directories, that is (fairly) easily done in ActiveX scripts.  There is a good example of looping through objects at sqldts.com: http://www.sqldts.com/Default.aspx?246

    Changing the DB name is the same thing - use ActiveX to parse out the desire connection name and then modify the DTS connection object.

    Good luck,

    Larry

    Larry

  • Hello Larry,  et al

    the major stumbling block is basically that I know zip

    about activeX and therefore am a bit reluctant about using it.

    (Although, going through BOL, I see that many of the advanced topics

     have examples using it - so I reckon I'd better look at it more seriously)

    Yes, the problem is a common one, and yes, I did manage to arrive

    at a non-activeX 'solution' of sorts: using the "for.." cmd in the humble MSDOS batch file,I eventually managed to get my files into a table!

    Thanx for the advice & the URL,will definitely visit   

    regards

    hb

  • Hi Larry,

    I checked the url but I seem to have a problem with the package because it seems only one file(they are CSV files with the last few digits as dates) is loaded several times into the database. I must be doing something wrong.

    Thanks for your anticipated help.

    Sam

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply