Friday, November 4, 2011

Extract multiple files

To extract multiple flat files, "For Loop Container" can do the trick:





Public Sub Main()

Dim theLetter, connString As String

connString = Dts.Connections("SourceConnectionFlatFile").ConnectionString.ToString

theLetter = Chr(Dts.Variables("varLetter").Value)

Dts.Connections("SourceConnectionFlatFile").ConnectionString
= Left(connString, 34) & theLetter & ".txt"

Dts.TaskResult = ScriptResults.Success

End Sub


However, Stan Kulp's blog seems to do the same thing. I will try it out. Here is the link: http://www.sqlservercentral.com/articles/Integration+Services+%28SSIS%29/75656/

Extract multiple files with a MultiFlatFileConnection data flow task

I have tried his method, and it worked great. Thanks!

No comments:

Post a Comment